sadpandajoe commented on code in PR #43944:
URL: https://github.com/apache/superset/pull/43944#discussion_r3946626146
##########
superset/security/guest_token.py:
##########
@@ -40,7 +42,17 @@ def build_guest_token_audit_payload(
"""
resources = body.get("resources") or []
rls = body.get("rls") or []
+ token_bytes = len(token.encode("utf-8"))
+ # HTTP/1-style accounting: name + colon-space + value + CRLF.
+ header_bytes = token_bytes + len(header_name.encode("utf-8")) + 4
+ budget = (
Review Comment:
A string-valued deployment setting makes this comparison raise after the
token has been minted, so the guest-token endpoint returns 500 rather than its
documented 200 response. For example,
`os.environ.get("GUEST_TOKEN_HEADER_MAX_BYTES", 16384)` yields a string when
configured. Could this normalize and validate the budget before comparing it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]