summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2020-11-01 18:09:12 -0600
committerGitHub <noreply@github.com>2020-11-01 18:09:12 -0600
commitf0a61fbe2f51173bf283989bee4085f8e839e952 (patch)
tree82dc3afa815d6dd3e26529c37fbf137af555b0e4 /src
parentee7ca28cc51cf40d1190144834704e287c9fc72d (diff)
parenta8fe2cb53472bdbd515124a56faadea3b6a9d46a (diff)
downloadpyramid-f0a61fbe2f51173bf283989bee4085f8e839e952.tar.gz
pyramid-f0a61fbe2f51173bf283989bee4085f8e839e952.tar.bz2
pyramid-f0a61fbe2f51173bf283989bee4085f8e839e952.zip
Merge pull request #3587 from ericatkin/master
cur_domain is effectively equivalent to '.' + cur_domain and therefor…
Diffstat (limited to 'src')
-rw-r--r--src/pyramid/authentication.py18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/pyramid/authentication.py b/src/pyramid/authentication.py
index 96946f427..8faf84d68 100644
--- a/src/pyramid/authentication.py
+++ b/src/pyramid/authentication.py
@@ -1025,24 +1025,20 @@ class AuthTktCookieHelper:
self.hashalg = hashalg
def _get_cookies(self, request, value, max_age=None):
- cur_domain = request.domain
-
- domains = []
if self.domain:
- domains.append(self.domain)
+ domain = self.domain
else:
+ cur_domain = request.domain
if self.parent_domain and cur_domain.count('.') > 1:
- domains.append('.' + cur_domain.split('.', 1)[1])
+ domain = cur_domain.split('.', 1)[1]
+ elif self.wild_domain:
+ domain = cur_domain
else:
- domains.append(None)
- domains.append(cur_domain)
- if self.wild_domain:
- domains.append('.' + cur_domain)
+ domain = None
profile = self.cookie_profile(request)
- kw = {}
- kw['domains'] = domains
+ kw = {'domains': [domain]}
if max_age is not None:
kw['max_age'] = max_age