Update login.php and users/login.php: change filtering technique
This commit is contained in:
parent
5c0734b7ab
commit
33dcfbd68e
@ -26,7 +26,7 @@ require("./functions.inc.php");
|
|||||||
include("./languages/" . check_language () . ".lang");
|
include("./languages/" . check_language () . ".lang");
|
||||||
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||||
$fUsername = escape_string ($_POST['fUsername']);
|
$fUsername = filter_input(INPUT_POST, 'fUsername', FILTER_VALIDATE_EMAIL);
|
||||||
$fPassword = escape_string ($_POST['fPassword']);
|
$fPassword = escape_string ($_POST['fPassword']);
|
||||||
|
|
||||||
$result = db_query("SELECT password FROM admin WHERE username='$fUsername' AND active='1'");
|
$result = db_query("SELECT password FROM admin WHERE username='$fUsername' AND active='1'");
|
||||||
|
@ -26,7 +26,7 @@ require("../functions.inc.php");
|
|||||||
include("../languages/" . check_language() . ".lang");
|
include("../languages/" . check_language() . ".lang");
|
||||||
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||||
$fUsername = escape_string($_POST['fUsername']);
|
$fUsername = filter_input(INPUT_POST, 'fUsername', FILTER_VALIDATE_EMAIL);
|
||||||
$fPassword = escape_string($_POST['fPassword']);
|
$fPassword = escape_string($_POST['fPassword']);
|
||||||
|
|
||||||
$result = db_query("SELECT password FROM mailbox WHERE username='$fUsername' AND active='1'");
|
$result = db_query("SELECT password FROM mailbox WHERE username='$fUsername' AND active='1'");
|
||||||
|
Loading…
Reference in New Issue
Block a user