Files
calendar/packages/app-store/webex
Volnei MunhozGitHubClaude Opus 4.6Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
14c151be76 fix: add CSRF protection to OAuth callback via HMAC-signed nonce (#28083)
* fix: add CSRF protection to OAuth callback via HMAC-signed nonce

The OAuth state parameter was used only for passing application data
(returnTo, teamId) with no cryptographic binding to the user session.
An attacker could authorize their own account on a provider, capture the
authorization code, and trick a logged-in user into visiting the callback
URL to link the attacker's account to the victim's Cal.com profile.

Changes:
- encodeOAuthState: generate a random nonce and HMAC-sign it with
  NEXTAUTH_SECRET + userId, injecting both into the OAuth state
- decodeOAuthState: verify the HMAC on callback using timingSafeEqual;
  skip verification when nonce is absent (backwards compatible with apps
  that don't yet use encodeOAuthState)
- Stripe callback: replace raw state.returnTo redirect with
  getSafeRedirectUrl to prevent open redirect, remove redundant
  getReturnToValueFromQueryState, add missing return on access_denied

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: make CSRF nonce verification mandatory with allowlist for exempt apps

Makes nonce/HMAC verification mandatory by default in decodeOAuthState,
preventing attackers from bypassing CSRF protection by omitting nonce
fields from the state parameter.

Apps not yet migrated to encodeOAuthState (stripe, basecamp3, dub,
webex, tandem) are explicitly allowlisted and pass their slug to
decodeOAuthState to skip verification.

Addresses review feedback (identified by cubic) about the conditional
check being trivially bypassable.

Co-Authored-By: unknown <>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-02-20 10:35:01 +00:00
..
2023-05-11 07:14:32 +00:00
2023-05-11 07:14:32 +00:00
2023-05-11 07:14:32 +00:00
2025-09-24 22:20:49 +09:00
2023-05-11 07:14:32 +00:00

Obtaining Webex Client ID and Secret

  1. Create a Webex account, if you don't already have one.
  2. Go to Webex for Developers and sign into to your Webex account. (Note: If you're creating a new account, create it on Webex, not on Webex for Developers)
  3. On the upper right, click the profile icon and go to "My Webex Apps"
  4. Click on "Create a New App" and select "Integration"
  5. Choose "No" for "Will this use a mobile SDK?"
  6. Give your app a name.
  7. Upload an icon or choose one of the default icons.
  8. Give your app a short description.
  9. Set the Redirect URI as <Cal.com URL>/api/integrations/webex/callback replacing Cal.com URL with the URI at which your application runs.
  10. Select the following scopes: "meeting:schedules_read", "meeting:schedules_write".
  11. Click "Add Integration".
  12. Copy the Client ID and Client Secret and add these while enabling the app through Settings -> Admin -> Apps interface