diff --git a/scripts/forgot_password.cgi b/scripts/forgot_password.cgi index e8ceb6a..e321217 100644 --- a/scripts/forgot_password.cgi +++ b/scripts/forgot_password.cgi @@ -30,7 +30,7 @@ for param in $POST_DATA; do done # Check if the user exists in the database -DB_PATH="/path/to/your/database.db" +DB_PATH="/var/lib/monotreme/data/monotreme .db" USER_EXISTS=$(sqlite3 $DB_PATH "SELECT COUNT(*) FROM users WHERE username='$USERNAME' AND email='$EMAIL';") if [ "$USER_EXISTS" -eq 0 ]; then @@ -53,7 +53,7 @@ TOKEN=$(openssl rand -hex 16) EXPIRATION=$(($(date +%s) + 3600)) # Store the reset token and expiration in the database -sqlite3 $DB_PATH "UPDATE users SET reset_token='$TOKEN', reset_expires=$EXPIRATION WHERE username='$USERNAME';" +sqlite3 $DB_PATH "UPDATE users SET reset_token='$TOKEN', reset_expires=$EXPIRATION WHERE username='$USERNAME';" # Send reset link email RESET_LINK="https://monotreme.org/cgi-bin/reset_password.cgi?token=$TOKEN" diff --git a/scripts/reset_password.cgi b/scripts/reset_password.cgi index 65f3a92..a62dcc2 100644 --- a/scripts/reset_password.cgi +++ b/scripts/reset_password.cgi @@ -30,7 +30,7 @@