From ef2186d47fc70c2c83115eeffa3b200a027388dd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=B2sweg?=
Date: Sun, 31 May 2020 04:42:31 +0200
Subject: [PATCH] Input password two times on registration
---
index.php | 1 +
login.php | 6 +++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/index.php b/index.php
index 51adabf..7057fed 100644
--- a/index.php
+++ b/index.php
@@ -5,6 +5,7 @@ include("include/settings.php");
+LibreCat
diff --git a/login.php b/login.php
index d4a8af5..77ea8f7 100644
--- a/login.php
+++ b/login.php
@@ -33,7 +33,10 @@ if($validUser){
$regErrorMsg = "";
if(isset($_POST["reg"])){
- if(password_verify($_POST["invite"],"$2y$10\$Mofyx6QsxEartbq..53zlu.FwTX0aMmUeRCNnISvfmrC44iA1SfSO")){
+ if($_POST["password"] != $_POST["rep_password"]){
+ $regErrorMsg = "Passwords don't match";
+ }
+ else if(password_verify($_POST["invite"],"$2y$10\$Mofyx6QsxEartbq..53zlu.FwTX0aMmUeRCNnISvfmrC44iA1SfSO")){
if($_POST["regname"]){
// Set user
@@ -97,6 +100,7 @@ if(isset($_POST["reg"])){
\n"; ?>