Script.php & get_mysql_credentials.php: Password salt variable removed.
parent
6543782ebe
commit
9816a7e22a
|
@ -279,12 +279,12 @@ if (!empty($_POST["frm_createlecturrer"])) {
|
||||||
$_SESSION["info_Admin_Users"]="Email address : ".$email." is already in use.";
|
$_SESSION["info_Admin_Users"]="Email address : ".$email." is already in use.";
|
||||||
header("Location: Admin.php");
|
header("Location: Admin.php");
|
||||||
}
|
}
|
||||||
$password_hash = password_hash("$password-$salt", PASSWORD_DEFAULT);
|
$password_hash = password_hash("$password", PASSWORD_DEFAULT);
|
||||||
$sql= "INSERT INTO `users_table`(`Email`, `Password`, `Full_Name`, `UserType`) VALUES "
|
$sql= "INSERT INTO `users_table`(`Email`, `Password`, `Full_Name`, `UserType`) VALUES "
|
||||||
. "('$email','$password_hash','$fullname','$type')";
|
. "('$email','$password_hash','$fullname','$type')";
|
||||||
|
|
||||||
if ($con->query($sql) === TRUE) {
|
if ($con->query($sql) === TRUE) {
|
||||||
$_SESSION["info_Admin_Users"] = $type . " user created successfully. Use email " . $email . " as account name and $password-$salt as password.";
|
$_SESSION["info_Admin_Users"] = $type . " user created successfully. Use email " . $email . " as account name and $password as password.";
|
||||||
header("Location: Admin.php");
|
header("Location: Admin.php");
|
||||||
} else {
|
} else {
|
||||||
echo "Error: " . $sql . "<br>" . $con->error;
|
echo "Error: " . $sql . "<br>" . $con->error;
|
||||||
|
|
|
@ -2,5 +2,4 @@
|
||||||
$csv = array_map('str_getcsv', file('./../../lrr_submission/KeepItSafe.txt'));
|
$csv = array_map('str_getcsv', file('./../../lrr_submission/KeepItSafe.txt'));
|
||||||
$mysql_username = $csv[0][0];
|
$mysql_username = $csv[0][0];
|
||||||
$mysql_password = $csv[0][1];
|
$mysql_password = $csv[0][1];
|
||||||
$salt = $csv[1][1]; // the second column in the second line of KeepItSafe.txt has the salt, e.g., Lrr@2022
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue