Skip to content

Commit

Permalink
[#4796] Don't prefix strings in auth_tkt.py as it breaks the cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Jul 26, 2019
1 parent 5957c3a commit b0e9759
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ckan/lib/repoze_plugins/auth_tkt.py
Expand Up @@ -27,16 +27,16 @@ def _get_cookies(self, *args, **kwargs):

cookies = []
for k, v in super_cookies:
replace_with = u'; HttpOnly' if self.httponly else u''
v = v.replace(u'; HttpOnly', u'') + replace_with
replace_with = '; HttpOnly' if self.httponly else ''
v = v.replace('; HttpOnly', '') + replace_with
cookies.append((k, v))

return cookies


def make_plugin(secret=None,
secretfile=None,
cookie_name=u'auth_tkt',
cookie_name='auth_tkt',
secure=False,
include_ip=False,
timeout=None,
Expand Down
2 changes: 1 addition & 1 deletion ckan/tests/test_coding_standards.py
Expand Up @@ -264,7 +264,6 @@ def find_unprefixed_string_literals(filename):
u'ckan/lib/activity_streams.py',
u'ckan/lib/activity_streams_session_extension.py',
u'ckan/lib/app_globals.py',
u'ckan/lib/auth_tkt.py',
u'ckan/lib/authenticator.py',
u'ckan/lib/base.py',
u'ckan/lib/captcha.py',
Expand Down Expand Up @@ -298,6 +297,7 @@ def find_unprefixed_string_literals(filename):
u'ckan/lib/search/index.py',
u'ckan/lib/search/query.py',
u'ckan/lib/search/sql.py',
u'ckan/lib/repoze_plugins/auth_tkt.py',
u'ckan/lib/uploader.py',
u'ckan/logic/__init__.py',
u'ckan/logic/action/__init__.py',
Expand Down

0 comments on commit b0e9759

Please sign in to comment.