diff --git a/website/mysql_config.xml b/website/mysql_config.xml
deleted file mode 100644
index de2d929..0000000
--- a/website/mysql_config.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
- localhost
- myhyvesbookplus
- mhbp
- qdtboXhCHJyL2szC
-
\ No newline at end of file
diff --git a/website/public/login.php b/website/public/login.php
index f889f2f..d8eb62a 100644
--- a/website/public/login.php
+++ b/website/public/login.php
@@ -15,16 +15,16 @@
// Trying to login
if ($_SERVER["REQUEST_METHOD"] == "POST") {
- $uname=strtolower($_POST["uname"]);
// Empty username or password field
if (empty($_POST["uname"]) || empty($_POST["psw"])) {
$loginErr = "Gebruikersnaam of wachtwoord is niet ingevuld";
}
else {
- $psw=$_POST["psw"];
- $hash=getUser()["password"];
- $userid=getUser()["userID"];
+ $uname = strtolower(test_input($_POST["uname"]));
+ $psw = test_input($_POST["psw"]);
+ $hash = getUser()["password"];
+ $userid = getUser()["userID"];
// If there's an account, go to the profile page
if(password_verify($psw, $hash)) {
diff --git a/website/public/register.php b/website/public/register.php
index c454d66..66d1454 100644
--- a/website/public/register.php
+++ b/website/public/register.php
@@ -4,7 +4,7 @@
include("../views/login_head.php");
require_once("../queries/connect.php");
include_once("../queries/register.php");
-
+ include_once("../queries/checkInput.php");
?>
diff --git a/website/queries/checkInput.php b/website/queries/checkInput.php
new file mode 100644
index 0000000..d48e4e0
--- /dev/null
+++ b/website/queries/checkInput.php
@@ -0,0 +1,95 @@
+
diff --git a/website/views/login-view.php b/website/views/login-view.php
index 9214a89..33fa7e9 100644
--- a/website/views/login-view.php
+++ b/website/views/login-view.php
@@ -46,6 +46,6 @@
diff --git a/website/views/register-view.php b/website/views/register-view.php
index f2b9257..b95dd81 100644
--- a/website/views/register-view.php
+++ b/website/views/register-view.php
@@ -108,7 +108,7 @@