-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct typo 'authtkt' for secure and http_only #4237
Conversation
98860c8
to
fa7a4bd
Compare
secure = settings.get("authtk_secure") | ||
secure = True if secure is None else secure != "False" | ||
http_only = settings.get("authtkt_http_only", "") | ||
http_only = False if http_only.lower() in ("false", "no", "0") else True |
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.
http_only = False if http_only.lower() in ("false", "no", "0") else True | |
http_only = not http_only.lower() in ("false", "no", "0") |
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.
http_only = False if http_only.lower() in ("false", "no", "0") else True | |
from pyramid.settings import asbool | |
http_only = asbool(settings.get("authtkt_http_only", "False")) |
- 'authtkt' instead of 'authtk' - Accept lower values - All for secure and http_only
fa7a4bd
to
c03423b
Compare
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.
Nice :-)
@sbrunner I can't merge |
Oups, it should be fixed :-) |
Never see this "authtk" string, without the final
t
. I guess it was a typo.Also, accept
false, False, No, no, 0
as "false value, and not onlyFalse
.Still
True
by default.