Skip to content

Commit d59552b

Browse files
author
hwyu@adobe.com
committed
MC-36034: Session size configuration
- Fixed issue with oversized input will default to 256000
1 parent a2d1989 commit d59552b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

app/code/Magento/Security/Model/Config/Backend/Session/SessionSize.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,14 @@ class SessionSize extends Value
2525
*/
2626
public function beforeSave()
2727
{
28-
$value = (int)$this->getValue();
29-
30-
if ($value === null || $value < 0) {
28+
$value = $this->getValue();
29+
if ($value === '0') {
3130
$value = 0;
31+
} else {
32+
$value = (int)$value;
33+
if ($value === null || $value <= 0) {
34+
$value = 256000;
35+
}
3236
}
3337
$this->setValue((string)$value);
3438
return $this;

0 commit comments

Comments
 (0)