diff options
| -rw-r--r-- | src/pyramid/authentication.py | 2 | ||||
| -rw-r--r-- | tests/test_authentication.py | 8 |
2 files changed, 2 insertions, 8 deletions
diff --git a/src/pyramid/authentication.py b/src/pyramid/authentication.py index 47570d5fc..1bddc1ff3 100644 --- a/src/pyramid/authentication.py +++ b/src/pyramid/authentication.py @@ -1035,8 +1035,8 @@ class AuthTktCookieHelper: domains.append('.' + cur_domain.split('.', 1)[1]) else: domains.append(None) - domains.append(cur_domain) if self.wild_domain: + domains.append(cur_domain) domains.append('.' + cur_domain) profile = self.cookie_profile(request) diff --git a/tests/test_authentication.py b/tests/test_authentication.py index 6d3b154e7..deeda5e78 100644 --- a/tests/test_authentication.py +++ b/tests/test_authentication.py @@ -1177,18 +1177,12 @@ class TestAuthTktCookieHelper(unittest.TestCase): helper = self._makeOne('secret', wild_domain=False) request = self._makeRequest() result = helper.remember(request, 'other') - self.assertEqual(len(result), 2) + self.assertEqual(len(result), 1) self.assertEqual(result[0][0], 'Set-Cookie') self.assertTrue(result[0][1].endswith('; Path=/; SameSite=Lax')) self.assertTrue(result[0][1].startswith('auth_tkt=')) - self.assertEqual(result[1][0], 'Set-Cookie') - self.assertTrue( - result[1][1].endswith('; Domain=localhost; Path=/; SameSite=Lax') - ) - self.assertTrue(result[1][1].startswith('auth_tkt=')) - def test_remember_parent_domain(self): helper = self._makeOne('secret', parent_domain=True) request = self._makeRequest() |
