diff options
author | tpazderka <tomas.pazderka@nic.cz> | 2014-06-23 17:41:51 +0200 |
---|---|---|
committer | tpazderka <tomas.pazderka@nic.cz> | 2014-06-23 17:41:51 +0200 |
commit | c196097c63fd94404943c61130747d31b8aeee41 (patch) | |
tree | c536aa813ecaeaed236c7ac400da44124cfc5440 /src/saml2/httpbase.py | |
parent | 041aa27dcdb74ed8d6a7febdbe9995181dd1c79d (diff) | |
download | pysaml2-c196097c63fd94404943c61130747d31b8aeee41.tar.gz |
Fixed set_cookie max-age parsing
Max-age is expected to be in seconds and thus cannot be parsed by _since_epoch.
Expire attribute is calculated from now() and max-age
Diffstat (limited to 'src/saml2/httpbase.py')
-rw-r--r-- | src/saml2/httpbase.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/saml2/httpbase.py b/src/saml2/httpbase.py index 56d4a7e5..eeb0a566 100644 --- a/src/saml2/httpbase.py +++ b/src/saml2/httpbase.py @@ -177,7 +177,7 @@ class HTTPBase(object): std_attr[attr] = morsel[attr] elif attr == "max-age": if morsel["max-age"]: - std_attr["expires"] = _since_epoch(morsel["max-age"]) + std_attr["expires"] = time.time() + int(morsel["max-age"]) for att, item in PAIRS.items(): if std_attr[att]: |