Implement CSRF protection in contact form: Added session management and CSRF token validation to enhance security. Updated AJAX response handling in JavaScript to reset button state after submission.
This commit is contained in:
@@ -3,6 +3,11 @@
|
||||
* Helper functions for HexaHost.de
|
||||
*/
|
||||
|
||||
// Start session for CSRF token
|
||||
if (session_status() === PHP_SESSION_NONE) {
|
||||
session_start();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set page configuration and include header
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user