mirror of
https://github.com/pi-hole/web.git
synced 2026-04-27 04:04:00 +01:00
Prevent javascript XSS attacks aimed to steal the session ID
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -97,6 +97,11 @@ function check_csrf($token) {
|
||||
session_id() == "";
|
||||
|
||||
if(!$session_started) {
|
||||
// Start a new PHP session (or continue an existing one)
|
||||
// Prevents javascript XSS attacks aimed to steal the session ID
|
||||
ini_set('session.cookie_httponly', 1);
|
||||
// Prevent Session ID from being passed through URLs
|
||||
ini_set('session.use_only_cookies', 1);
|
||||
session_start();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user