summaryrefslogtreecommitdiff
path: root/src/saml2/httpbase.py
diff options
context:
space:
mode:
authorRoland Hedberg <roland.hedberg@adm.umu.se>2013-01-04 14:41:04 +0100
committerRoland Hedberg <roland.hedberg@adm.umu.se>2013-01-04 14:41:04 +0100
commit6f5a11fe8d0e89eb3507cfe05da6fce569999f82 (patch)
tree7ffad781f35ded688feaa6248706a1e5903dedbf /src/saml2/httpbase.py
parent396f7d6ea2eb452237cca6645d262caefb67dc08 (diff)
downloadpysaml2-6f5a11fe8d0e89eb3507cfe05da6fce569999f82.tar.gz
Made POST BINDING for authn work
Diffstat (limited to 'src/saml2/httpbase.py')
-rw-r--r--src/saml2/httpbase.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/saml2/httpbase.py b/src/saml2/httpbase.py
index 862f68e1..79f9fbeb 100644
--- a/src/saml2/httpbase.py
+++ b/src/saml2/httpbase.py
@@ -3,6 +3,7 @@ import cookielib
import copy
import requests
import time
+from saml2.time_util import utc_now
from saml2 import class_name
from saml2.pack import http_form_post_message
from saml2.pack import make_soap_enveloped_saml_thingy
@@ -44,6 +45,10 @@ class ConnectionError(Exception):
def _since_epoch(cdate):
# date format 'Wed, 06-Jun-2012 01:34:34 GMT'
+ if len(cdate) < 29: # somethings broken
+ if len(cdate) < 5:
+ return utc_now()
+
cdate = cdate[5:-4]
try:
t = time.strptime(cdate, "%d-%b-%Y %H:%M:%S")