Commit Graph

14 Commits (a01f30c887bd90210c493da7ddf43c4555ad8d4c)

Author SHA1 Message Date
SayidCali jamac 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
2025-05-25 06:16:14 +08:00
Lan Hui 593ac0219a Submissions.php: replace frm with form 2023-09-03 20:42:15 +08:00
Lan Hui 498f5549df Make index page, sign up page and recover password page look better. 2023-08-10 22:41:59 +08:00
Lan Hui 6af2d77912 Add non-sticky footer. 2023-08-08 15:02:26 +08:00
Lan Hui 9c529e0022 Upgrade to Bootstrap 5. TODO: nav tab does not work in Admin.php. 2023-08-06 17:43:36 +08:00
Lan Hui 890083d159 Use better form information. 2023-08-04 18:31:03 +08:00
Lan Hui a56b4c00dd (1) Make php files look better; (2) Removed Visitors.php and Reset_password.php because they are no longer used; (3) TODO: review Submissions.php, Script.php, Course.php and Courses.php. 2023-08-01 17:02:33 +08:00
徐宣 74a8a68ee9 Xuxuan (#48)
Co-authored-by: Xuxuan <1683793776@qq.com>
Co-authored-by: Hui Lan <lanhui@zjnu.edu.cn>
Reviewed-on: http://121.4.94.30:3000/mrlan/LRR/pulls/48
Co-authored-by: 徐宣 <1683793776@qq.com>
Co-committed-by: 徐宣 <1683793776@qq.com>
2022-11-08 15:24:36 +08:00
Hui Lan 197e557963 recover_password.php: require that the two fields must not be empty. 2021-04-09 15:41:32 +08:00
Hui Lan 476aa87178 index.php, signup.php and recover_password.php: change button widths. 2021-04-09 15:17:01 +08:00
enockkays 6ba6ebe414
Update recover_password.php
We added first increased the padding for the recover button and also added some CSS properties for the hover effect.
2020-12-25 21:41:34 +08:00
Hui Lan ada55d3394 [Refactoring] Particularly make the SQL statement that shows new assigmments in Coruse.php less messy. 2020-10-02 17:02:20 +08:00
Hui Lan df3b48553a Several fixes (sign up/sign in, recover password, etc). 2020-09-26 20:08:39 +08:00
CloudStarTreck 2ac128c680 adding LRR files
uploading the full project online
2020-03-16 15:23:14 +08:00