This repository has been archived by the owner on Dec 12, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 21
Fix expiryInSeconds = null
has no effect
#51
Merged
BracketJohn
merged 6 commits into
sidebase:main
from
interpretor:fix-expiryinseconds-null
Dec 5, 2022
Merged
Fix expiryInSeconds = null
has no effect
#51
BracketJohn
merged 6 commits into
sidebase:main
from
interpretor:fix-expiryinseconds-null
Dec 5, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interpretor
force-pushed
the
fix-expiryinseconds-null
branch
from
December 1, 2022 08:37
38a8ba7
to
6d85a04
Compare
BracketJohn
suggested changes
Dec 5, 2022
Co-authored-by: Nils <nils.jonalik@rwth-aachen.de>
interpretor
commented
Dec 5, 2022
@@ -10,7 +10,7 @@ import { useRuntimeConfig } from '#imports' | |||
const SESSION_COOKIE_NAME = 'sessionId' | |||
const safeSetCookie = (event: H3Event, name: string, value: string, createdAt: Date) => { | |||
const sessionOptions = useRuntimeConfig().session.session as SessionOptions | |||
const expirationDate = sessionOptions.expiryInSeconds | |||
const expirationDate = sessionOptions.expiryInSeconds !== false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BracketJohn We should also check here for explicit boolean/false value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, good catch
BracketJohn
approved these changes
Dec 5, 2022
BracketJohn
approved these changes
Dec 5, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #38.
Checklist:
#
)Properties with null values aren't copied by
defu
.As mentioned here, we would need to exchange
defu
with another module which doesn't ignore null, or change theexpiryInSeconds
option to use false instead of null.I also changed the
domain
property type, as it is also affected, but currently doesn't make any problems, because null is the default value here.