Skip to content

Commit c8b685a

Browse files
author
Marius Cramer
committed
- session removal fix (CSRF)
1 parent 352477d commit c8b685a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

interface/lib/classes/tform_base.inc.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -714,8 +714,8 @@ protected function _encode($record, $tab, $dbencode = true, $api = false) {
714714
unset($_POST);
715715
unset($record);
716716
}
717-
$_SESSION['_csrf'][$_csrf_id] = ' ';
718-
$_SESSION['_csrf_timeout'][$_csrf_id] = ' ';
717+
$_SESSION['_csrf'][$_csrf_id] = null;
718+
$_SESSION['_csrf_timeout'][$_csrf_id] = null;
719719
unset($_SESSION['_csrf'][$_csrf_id]);
720720
unset($_SESSION['_csrf_timeout'][$_csrf_id]);
721721

@@ -725,6 +725,8 @@ protected function _encode($record, $tab, $dbencode = true, $api = false) {
725725
if($timeout < time()) $to_unset[] = $_csrf_id;
726726
}
727727
foreach($to_unset as $_csrf_id) {
728+
$_SESSION['_csrf'][$_csrf_id] = null;
729+
$_SESSION['_csrf_timeout'][$_csrf_id] = null;
728730
unset($_SESSION['_csrf'][$_csrf_id]);
729731
unset($_SESSION['_csrf_timeout'][$_csrf_id]);
730732
}

0 commit comments

Comments
 (0)