Module: check_mk
Branch: master
Commit: d49fb600e6aeaada7a5b657a9c98770ead7410a8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d49fb600e6aeaa…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jun 30 14:23:40 2015 +0200
Fixed setting cooki secure flag correctly
---
web/htdocs/html_mod_python.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/html_mod_python.py b/web/htdocs/html_mod_python.py
index c15d54c..6a0c6f5 100644
--- a/web/htdocs/html_mod_python.py
+++ b/web/htdocs/html_mod_python.py
@@ -71,7 +71,11 @@ class html_mod_python(htmllib.html):
def set_cookie(self, varname, value, expires = None):
# httponly tells the browser not to make this cookie available to Javascript
- c = Cookie.Cookie(varname, value, path='/', secure=self.is_ssl_request(),
httponly=True)
+ c = Cookie.Cookie(varname, value, path='/', httponly=True)
+
+ if self.is_ssl_request():
+ c.secure = True
+
if expires is not None:
c.expires = expires