Skip to content

Commit e1b275a

Browse files
committed
only restore wsgi.input if s2repoze.body was set
1 parent b619018 commit e1b275a

File tree

1 file changed

+3
-1
lines changed
  • src/s2repoze/plugins

1 file changed

+3
-1
lines changed

src/s2repoze/plugins/sp.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,9 @@ def identify(self, environ):
496496
# find it
497497
environ["post.fieldstorage"] = post
498498
# restore wsgi.input incase that is needed
499-
environ['wsgi.input'] = StringIO(environ['s2repoze.body'])
499+
# only of s2repoze.body is present
500+
if 's2repoze.body' in environ:
501+
environ['wsgi.input'] = StringIO(environ['s2repoze.body'])
500502
return {}
501503
else:
502504
logger.info("[sp.identify] --- SAMLResponse ---")

0 commit comments

Comments
 (0)