File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -564,10 +564,10 @@ async def retry_cae_response_if_required(
564564 if auth_header_value .casefold ().startswith (
565565 self .BEARER_AUTHENTICATION_SCHEME .casefold ()
566566 ):
567- claims_match = re .search ('claims="(. +)"' , auth_header_value )
567+ claims_match = re .search ('claims="([^"] +)"' , auth_header_value )
568568 if not claims_match :
569569 raise ValueError ("Unable to parse claims from response" )
570- response_claims = claims_match .group (). split ( '="' )[ 1 ]
570+ response_claims = claims_match .group (1 )
571571 parent_span .add_event (AUTHENTICATE_CHALLENGED_EVENT_KEY )
572572 parent_span .set_attribute ("http.retry_count" , 1 )
573573 return await self .get_http_response_message (
Original file line number Diff line number Diff line change @@ -394,7 +394,7 @@ async def test_retries_on_cae_failure(
394394 {
395395 "claims" : (
396396 "eyJhY2Nlc3NfdG9rZW4iOnsibmJmIjp7ImVzc2VudGlhbCI6dHJ1ZSwgInZhbH"
397- "VlIjoiMTYwNDEwNjY1MSJ9fX0"
397+ "VlIjoiMTYwNDEwNjY1MSJ9fX0= "
398398 )
399399 },
400400 ),
You can’t perform that action at this time.
0 commit comments