From 4fb59e891c8f3eb7f262a0ab67303293610456b8 Mon Sep 17 00:00:00 2001 From: TOW Date: Wed, 3 Apr 2019 08:41:50 -0300 Subject: Bugfix relacionado al borrado de cookies Las cookies literalmente no se estaban eliminando por una confusiĆ³n con los paths. --- cgi/framework.py | 10 ++++++++-- 1 file 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=' '): -- cgit v1.2.1-18-gbd029