Skip to content

fix(auth): converge duplicate non-ASCII API-key repair into #543 - #549

Closed
seonghobae wants to merge 2 commits into
mainfrom
sentinel-hmac-utf8-fix-15592441047623792894
Closed

fix(auth): converge duplicate non-ASCII API-key repair into #543#549
seonghobae wants to merge 2 commits into
mainfrom
sentinel-hmac-utf8-fix-15592441047623792894

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Final disposition: valid delta is fully carried by canonical successor #543

  • protected/base: main@47c6fd27de13b0da37a7db64697b869941909351
  • original duplicate candidate: 6b08e08dceba8c99fc8d8f91e9e6e35287cb76b6
  • exact repaired head: 5022b72e66ca4a74080ada6c56253953460c81a0
  • fresh protected-base compare: ahead 2 / behind 0 / files=[]
  • canonical successor: fix(auth): reject non-ASCII API-key input without request-time TypeError #543, current fix-api-key-utf8-12987541694327418735@4f010e19f88b9d35a582d4acad96a3defeaf9026

Carryover verification

This PR's valid semantic change is byte-wise hmac.compare_digest() at the request authentication boundary so non-ASCII X-API-Key input follows the normal 401 response rather than raising Python's string-mode TypeError. #543 already carries the same production change and a middleware-boundary regression that sends a non-ASCII key and requires the same 401 JSON contract. Its wording also correctly bounds the defect as authentication/input handling rather than promoting the available evidence to a server-wide CRITICAL DoS claim.

The additional .jules/sentinel.md entry in this duplicate is not valid unique carryover: it labels the case as CRITICAL DoS and turns the implementation choice into repository-wide doctrine without evidence for server-wide availability impact. That generated doctrine is deliberately not transferred.

#543 therefore fully carries the valid source behavior, test contract and security boundary from this duplicate. #543 remains Draft and must earn its own unchanged-head gates/review; closing this duplicate does not promote #543 or transfer any check result.

Repair

Ordinary descendant 5022b72e66ca4a74080ada6c56253953460c81a0 preserves the duplicate candidate in ancestry while restoring the exact protected main tree. Branch advancement used force=false; fresh compare has merge base exactly 47c6fd27..., ahead 2, behind 0 and zero changed files.

Close unmerged under the verified-successor exception. No force push, destructive rebase, self-approval, gate weakening, predecessor-GREEN transfer, synthetic status, source-neutral retrigger, protected merge, tag or release is used.

…aracter encoding

* Update `hmac.compare_digest` calls in `saas_web.py` to convert arguments to UTF-8 before comparison.
* Add a test `test_non_ascii_key_does_not_crash_but_rejected` in `tests/test_saas_web.py` to prevent regression.
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: a11fc114-4e8c-4ab2-8895-be631a3e9af8

📥 Commits

Reviewing files that changed from the base of the PR and between 47c6fd2 and 6b08e08.

📒 Files selected for processing (3)
  • .jules/sentinel.md
  • saas_web.py
  • tests/test_saas_web.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae seonghobae changed the title 🛡️ Sentinel: [CRITICAL] API 키 인증 시 hmac 문자 인코딩 관련 500 에러 수정 fix(auth): converge duplicate non-ASCII API-key repair into #543 Sep 8, 2026
@seonghobae seonghobae closed this Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant