mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-01 02:41:39 -05:00
Ensured falsy values not returned from cache cookie
no-issue
This commit is contained in:
parent
ab4493db5f
commit
957a0df658
1 changed files with 5 additions and 1 deletions
|
@ -195,7 +195,11 @@ class MembersSSR {
|
|||
return null;
|
||||
}
|
||||
try {
|
||||
return JSON.parse(value);
|
||||
const parsed = JSON.parse(value);
|
||||
if (!parsed) {
|
||||
throw new Error('Parsed value was falsy');
|
||||
}
|
||||
return parsed;
|
||||
} catch (err) {
|
||||
this._removeCacheCookie(req, res);
|
||||
throw new BadRequestError({
|
||||
|
|
Loading…
Add table
Reference in a new issue