aboutsummaryrefslogtreecommitdiff
path: root/cgi
diff options
context:
space:
mode:
authorLibravatar TOW 2019-04-03 08:41:50 -0300
committerLibravatar TOW 2019-04-03 08:41:50 -0300
commit4fb59e891c8f3eb7f262a0ab67303293610456b8 (patch)
tree206e85638d0654c84921e3e31e04a3d9b60235bf /cgi
parentccb5b163ea33a956b56d97812798212eb2a40c4f (diff)
downloadweabot-4fb59e891c8f3eb7f262a0ab67303293610456b8.tar.gz
weabot-4fb59e891c8f3eb7f262a0ab67303293610456b8.tar.xz
weabot-4fb59e891c8f3eb7f262a0ab67303293610456b8.zip
Bugfix relacionado al borrado de cookies
Las cookies literalmente no se estaban eliminando por una confusiĆ³n con los paths.
Diffstat (limited to 'cgi')
-rw-r--r--cgi/framework.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/cgi/framework.py b/cgi/framework.py
index 2cfabe3..4a9a6e2 100644
--- a/cgi/framework.py
+++ b/cgi/framework.py
@@ -368,10 +368,16 @@ def deleteCookie(self, key):
"""
Copied from Colubrid
"""
+ if key not in self._cookies:
+ return # Cookie doesn't exist
if self._newcookies is None:
self._newcookies = SimpleCookie()
- if not key in self._newcookies:
- self._newcookies[key] = ""
+ self._newcookies[key] = ""
+ if self._cookies[key]["path"]:
+ self._newcookies[key]["path"] = self._cookies[key]["path"]
+ else:
+ self._newcookies[key]["path"] = "/"
+ self._newcookies[key]["domain"] = self._cookies[key]["domain"]
self._newcookies[key]["max-age"] = 0
def elapsed_time(seconds, suffixes=['y','w','d','h','m','s'], add_s=False, separator=' '):