Skip to content

Commit 199e30c

Browse files
committed
Revert "add debug code to try pin down unknown response errors"
This reverts commit 5e489ae.
1 parent 5e489ae commit 199e30c

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/auth_server/saml2.py

+2-10
Original file line numberDiff line numberDiff line change
@@ -296,18 +296,10 @@ async def process_assertion(saml_response: str) -> Optional[AssertionData]:
296296

297297
response, authn_ref = await get_authn_response(saml_response)
298298
logger.debug(f"authn response: {response}")
299+
299300
if authn_ref not in saml2_sp.authn_req_cache:
300301
logger.info("Unknown response")
301-
# DEBUG flaky cache?
302-
from time import sleep
303-
304-
logger.debug(f"current authn_ref: {authn_ref}")
305-
logger.debug(f"existing authn_req_cache: {saml2_sp.authn_req_cache.items()}")
306-
# retry lookup
307-
sleep(1)
308-
if authn_ref not in saml2_sp.authn_req_cache:
309-
logger.info("Unknown response, second try")
310-
raise BadSAMLResponse("Unknown response")
302+
raise BadSAMLResponse("Unknown response")
311303

312304
session_info = SessionInfo.from_pysaml2(response.session_info())
313305
assertion_data = AssertionData(session_info=session_info, authn_req_ref=authn_ref)

0 commit comments

Comments
 (0)