Implement email password recovery feature for LRR system #75

Open
zayid wants to merge 1 commits from Bug197-Zayid-V2 into Hui-Organize
Collaborator

Features implemented:

  • Email-based password recovery using 163.com SMTP (no VPN required)
  • Secure token-based password reset with 10-minute expiration
  • Improved UX with success messages in green styling
  • Automatic redirect to login page after successful password reset
  • Comprehensive security measures (CSRF protection, SQL injection prevention)

Technical changes:

  • Added password_reset_tokens table to database schema
  • Updated Script.php with password recovery logic
  • Enhanced index.php and recover_password.php with success message styling
  • Migrated from Gmail SMTP to 163.com SMTP for better reliability

Testing:

  • All teacher-provided tests: 12/12 passed (141.63s)
  • Email password recovery tests: 2/2 passed (22.55s)
  • Total success rate: 100%

Security features:

  • Time-limited tokens (10-minute expiration)
  • Secure token generation using bin2hex(random_bytes(32))
  • Foreign key constraints for data integrity
  • Rate limiting considerations

Fixes: Bug #197 - Password recovery functionality

Features implemented: - Email-based password recovery using 163.com SMTP (no VPN required) - Secure token-based password reset with 10-minute expiration - Improved UX with success messages in green styling - Automatic redirect to login page after successful password reset - Comprehensive security measures (CSRF protection, SQL injection prevention) Technical changes: - Added password_reset_tokens table to database schema - Updated Script.php with password recovery logic - Enhanced index.php and recover_password.php with success message styling - Migrated from Gmail SMTP to 163.com SMTP for better reliability Testing: - All teacher-provided tests: 12/12 passed (141.63s) - Email password recovery tests: 2/2 passed (22.55s) - Total success rate: 100% Security features: - Time-limited tokens (10-minute expiration) - Secure token generation using bin2hex(random_bytes(32)) - Foreign key constraints for data integrity - Rate limiting considerations Fixes: Bug #197 - Password recovery functionality
zayid added 1 commit 2025-05-25 06:22:23 +08:00
a01f30c887 Implement email password recovery feature for LRR system
Features implemented:
- Email-based password recovery using 163.com SMTP (no VPN required)
- Secure token-based password reset with 10-minute expiration
- Improved UX with success messages in green styling
- Automatic redirect to login page after successful password reset
- Comprehensive security measures (CSRF protection, SQL injection prevention)

Technical changes:
- Added password_reset_tokens table to database schema
- Updated Script.php with password recovery logic
- Enhanced index.php and recover_password.php with success message styling
- Migrated from Gmail SMTP to 163.com SMTP for better reliability

Testing:
- All teacher-provided tests: 12/12 passed (141.63s)
- Email password recovery tests: 2/2 passed (22.55s)
- Total success rate: 100%

Security features:
- Time-limited tokens (10-minute expiration)
- Secure token generation using bin2hex(random_bytes(32))
- Foreign key constraints for data integrity
- Rate limiting considerations

Fixes: Bug #197 - Password recovery functionality

@zayid
Thanks. I will check.

@zayid Thanks. I will check.
Poster
Collaborator

@mrlan ok teacher, thanks.

@mrlan ok teacher, thanks.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b Bug197-Zayid-V2 Hui-Organize
git pull origin Bug197-Zayid-V2

Step 2:

Merge the changes and update on Gitea.
git checkout Hui-Organize
git merge --no-ff Bug197-Zayid-V2
git push origin Hui-Organize
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mrlan/LRR#75
There is no content yet.