Skip to content

fix: correct null check for gatewayAuthMeta in subscription validation#455

Merged
benbrandt merged 1 commit intoagentclientprotocol:mainfrom
tbounsiar:fix/gateway-auth-null-check
Mar 24, 2026
Merged

fix: correct null check for gatewayAuthMeta in subscription validation#455
benbrandt merged 1 commit intoagentclientprotocol:mainfrom
tbounsiar:fix/gateway-auth-null-check

Conversation

@tbounsiar
Copy link
Copy Markdown
Contributor

Summary

  • gatewayAuthMeta is declared as an optional property (undefined when unset), but the subscription validation compared it against null
  • This made the condition always false, so --hide-claude-auth never blocked claude.ai subscription users when no gateway was configured
  • Changed === null to !this.gatewayAuthMeta to match the actual property semantics

Test plan

  • npm run build compiles clean
  • npm run lint passes
  • All 6 authorization tests pass

@cla-bot
Copy link
Copy Markdown

cla-bot bot commented Mar 23, 2026

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Tahar BOUNSIAR.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

gatewayAuthMeta is declared as an optional property (undefined when unset),
but the check compared against null, making the condition always false.
This meant --hide-claude-auth never blocked claude.ai subscription users
when no gateway was configured.
@tbounsiar tbounsiar force-pushed the fix/gateway-auth-null-check branch from d1d9033 to b0a01d7 Compare March 23, 2026 13:17
@cla-bot
Copy link
Copy Markdown

cla-bot bot commented Mar 23, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @tbounsiar on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@tbounsiar
Copy link
Copy Markdown
Contributor Author

@cla-bot check

@cla-bot
Copy link
Copy Markdown

cla-bot bot commented Mar 23, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @tbounsiar on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@cla-bot
Copy link
Copy Markdown

cla-bot bot commented Mar 23, 2026

The cla-bot has been summoned, and re-checked this pull request!

@tbounsiar
Copy link
Copy Markdown
Contributor Author

@cla-bot check

@cla-bot cla-bot bot added the cla-signed label Mar 23, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot bot commented Mar 23, 2026

The cla-bot has been summoned, and re-checked this pull request!

@benbrandt benbrandt enabled auto-merge (squash) March 24, 2026 21:21
@benbrandt benbrandt merged commit 34c847a into agentclientprotocol:main Mar 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants