misc: change session cookie prefix to be sessionid- (#43043)
This commit is contained in:
parent
47e57c15db
commit
36e55b6865
|
@ -5222,13 +5222,13 @@ def test_session_cookie_flags(pub):
|
|||
formdef = create_formdef()
|
||||
app = get_app(pub)
|
||||
resp = app.get('/test/', status=200)
|
||||
assert resp.headers['Set-Cookie'].startswith('wcs-')
|
||||
assert resp.headers['Set-Cookie'].startswith('sessionid-')
|
||||
assert 'httponly' in resp.headers['Set-Cookie']
|
||||
assert not 'secure' in resp.headers['Set-Cookie']
|
||||
|
||||
app = get_app(pub, https=True)
|
||||
resp = app.get('/test/', status=200)
|
||||
assert resp.headers['Set-Cookie'].startswith('wcs-')
|
||||
assert resp.headers['Set-Cookie'].startswith('sessionid-')
|
||||
assert 'httponly' in resp.headers['Set-Cookie']
|
||||
assert 'secure' in resp.headers['Set-Cookie']
|
||||
|
||||
|
|
|
@ -423,7 +423,7 @@ class QommonPublisher(Publisher, object):
|
|||
|
||||
md5_hash = hashlib.md5()
|
||||
md5_hash.update(force_bytes(self.app_dir))
|
||||
self.config.session_cookie_name = self.APP_NAME + '-' + md5_hash.hexdigest()[:6]
|
||||
self.config.session_cookie_name = 'sessionid-%s-%s' % (self.APP_NAME, md5_hash.hexdigest()[:6])
|
||||
self.config.session_cookie_path = '/'
|
||||
|
||||
if debug_cfg.get('logger', True):
|
||||
|
|
Loading…
Reference in New Issue