twotalesanimation 1ef4d06627 Phase 1: Implement CSRF protection, input validation, and rate limiting
Major security improvements:
- Added CSRF token generation, validation, and cleanup functions
- Implemented comprehensive input validators (email, phone, name, date, amount, ID, file uploads)
- Added rate limiting with login attempt tracking and account lockout (5 failures = 15 min lockout)
- Implemented session fixation protection with session_regenerate_id() and 30-min timeout
- Fixed SQL injection in getResultFromTable() with whitelisted columns/tables
- Added audit logging for security events
- Applied CSRF validation to all 7 process_*.php files
- Applied input validation to critical endpoints (login, registration, bookings, application)
- Created database migration for login_attempts, audit_log tables and locked_until column

Modified files:
- functions.php: +500 lines of security functions
- validate_login.php: Added CSRF, rate limiting, session hardening
- register_user.php: Added CSRF, input validation, registration rate limiting
- process_*.php (7 files): Added CSRF token validation
- Created migration: 001_phase1_security_schema.sql

Next steps: Add CSRF tokens to form templates, harden file uploads, create testing checklist
2025-12-03 11:28:53 +02:00
2025-12-02 18:17:20 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-07-24 07:20:51 +02:00
2025-05-23 14:31:07 +02:00
2025-06-13 10:22:14 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-05-23 14:25:27 +02:00
2025-05-23 14:25:27 +02:00
2025-04-18 10:32:42 +02:00
2025-12-02 18:17:20 +02:00
2025-05-23 14:19:25 +02:00
2025-07-24 07:20:51 +02:00
2025-04-18 10:32:42 +02:00
2025-07-24 07:20:51 +02:00
2025-04-18 10:32:42 +02:00
2025-06-08 16:29:50 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-12-02 18:17:20 +02:00
2025-04-18 10:32:42 +02:00
2025-12-02 18:17:20 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-05-23 14:25:27 +02:00
2025-04-18 10:32:42 +02:00
2025-05-23 11:50:53 +02:00
2025-05-23 11:50:53 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-05-23 11:50:53 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-12-02 18:17:20 +02:00
2025-05-23 11:50:53 +02:00
2025-07-24 07:20:51 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-05-23 14:25:27 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-05-23 14:25:27 +02:00
2025-05-23 14:25:27 +02:00
2025-12-02 18:17:20 +02:00
2025-12-02 18:17:20 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-12-02 18:17:20 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-05-23 14:31:07 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-06-08 16:29:50 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-05-23 14:19:25 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-05-23 14:25:27 +02:00
2025-07-24 07:20:51 +02:00
2025-12-02 18:17:20 +02:00
2025-04-18 10:32:42 +02:00
2025-07-24 07:20:51 +02:00
2025-04-18 10:32:42 +02:00
2025-05-23 14:25:27 +02:00
2025-12-02 18:17:20 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-05-23 14:25:27 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
2025-12-02 18:17:20 +02:00
2025-05-23 14:31:07 +02:00
2025-07-24 07:20:51 +02:00
2025-07-24 07:20:51 +02:00
2025-05-23 14:25:27 +02:00
2025-05-23 14:25:27 +02:00
2025-05-23 14:25:27 +02:00
2025-05-23 14:25:27 +02:00
2025-05-23 14:25:27 +02:00
2025-04-18 10:32:42 +02:00
2025-04-18 10:32:42 +02:00
Description
No description provided
168 MiB
Languages
PHP 61.8%
CSS 26.1%
Sass 5.5%
HTML 4.4%
JavaScript 1.1%
Other 1.1%