mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-19 00:01:29 +00:00
fix: regression responses_id_security
This commit is contained in:
parent
3bd42b7ccf
commit
4145f8c098
1 changed files with 10 additions and 3 deletions
|
|
@ -133,8 +133,11 @@ class ResponsesIDSecurity(CustomLogger):
|
|||
return True
|
||||
|
||||
def _is_encrypted_response_id(self, response_id: str) -> bool:
|
||||
|
||||
remaining_string = response_id.split("resp_")[1]
|
||||
split_result = response_id.split("resp_")
|
||||
if len(split_result) < 2:
|
||||
return False
|
||||
|
||||
remaining_string = split_result[1]
|
||||
decrypted_value = decrypt_value_helper(
|
||||
value=remaining_string, key="response_id", return_original_value=True
|
||||
)
|
||||
|
|
@ -155,7 +158,11 @@ class ResponsesIDSecurity(CustomLogger):
|
|||
- user_id: the user id
|
||||
- team_id: the team id
|
||||
"""
|
||||
remaining_string = response_id.split("resp_")[1]
|
||||
split_result = response_id.split("resp_")
|
||||
if len(split_result) < 2:
|
||||
return response_id, None, None
|
||||
|
||||
remaining_string = split_result[1]
|
||||
decrypted_value = decrypt_value_helper(
|
||||
value=remaining_string, key="response_id", return_original_value=True
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue