Skip to content

Commit f3cc2c3

Browse files
author
Marius Cramer
committed
- session removal fix (csrf)
1 parent e8f9436 commit f3cc2c3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

interface/lib/classes/tform.inc.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,8 +685,8 @@ function encode($record, $tab, $dbencode = true) {
685685
unset($_POST);
686686
unset($record);
687687
}
688-
$_SESSION['_csrf'][$_csrf_id] = ' ';
689-
$_SESSION['_csrf_timeout'][$_csrf_id] = ' ';
688+
$_SESSION['_csrf'][$_csrf_id] = null;
689+
$_SESSION['_csrf_timeout'][$_csrf_id] = null;
690690
unset($_SESSION['_csrf'][$_csrf_id]);
691691
unset($_SESSION['_csrf_timeout'][$_csrf_id]);
692692

@@ -696,6 +696,8 @@ function encode($record, $tab, $dbencode = true) {
696696
if($timeout < time()) $to_unset[] = $_csrf_id;
697697
}
698698
foreach($to_unset as $_csrf_id) {
699+
$_SESSION['_csrf'][$_csrf_id] = null;
700+
$_SESSION['_csrf_timeout'][$_csrf_id] = null;
699701
unset($_SESSION['_csrf'][$_csrf_id]);
700702
unset($_SESSION['_csrf_timeout'][$_csrf_id]);
701703
}

0 commit comments

Comments
 (0)