Make sure to also delete any un-suffixed cookies when deleting a cookie
Follow-up to a161feb
This commit is contained in:
parent
6c21ee32a8
commit
41fe997af4
1 changed files with 8 additions and 0 deletions
|
|
@ -410,6 +410,14 @@ class OctoPrintFlaskResponse(flask.Response):
|
|||
# add request specific cookie suffix to name
|
||||
flask.Response.set_cookie(self, key + flask.request.cookie_suffix, *args, **kwargs)
|
||||
|
||||
def delete_cookie(self, key, path='/', domain=None):
|
||||
flask.Response.delete_cookie(self, key, path=path, domain=domain)
|
||||
|
||||
# we also still might have a cookie left over from before we started prefixing, delete that manually
|
||||
# without any pre processing (no path prefix, no key suffix)
|
||||
flask.Response.set_cookie(self, key, expires=0, max_age=0, path=path, domain=domain)
|
||||
|
||||
|
||||
#~~ passive login helper
|
||||
|
||||
def passive_login():
|
||||
|
|
|
|||
Loading…
Reference in a new issue