Title: fix(chat-otp): re-check authType before minting deployment auth cookie by waleedlatif1 · Pull Request #5600 · simstudioai/sim · GitHub
Open Graph Title: fix(chat-otp): re-check authType before minting deployment auth cookie by waleedlatif1 · Pull Request #5600 · simstudioai/sim
X Title: fix(chat-otp): re-check authType before minting deployment auth cookie by waleedlatif1 · Pull Request #5600 · simstudioai/sim
Description: Summary The chat OTP verify endpoint (PUT /api/chat/[identifier]/otp) minted the deployment auth cookie using the chat's current authType without re-checking it was still email, unlike the sibling POST handler and the public-file OTP route Added the same authType !== 'email' guard used elsewhere, right before OTP verification/cookie minting Type of Change Bug fix (security) Testing Added a regression test asserting the guard rejects verification when the chat is no longer email-auth, and confirmed it fails without the fix bunx vitest run app/api/chat/[identifier]/otp/route.test.ts — 17/17 passing bun run check:api-validation passes Typecheck and lint clean on changed files Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Open Graph Description: Summary The chat OTP verify endpoint (PUT /api/chat/[identifier]/otp) minted the deployment auth cookie using the chat's current authType without re-checking it was still email, unlike the sib...
X Description: Summary The chat OTP verify endpoint (PUT /api/chat/[identifier]/otp) minted the deployment auth cookie using the chat's current authType without re-checking it was still email, unlike the...
Opengraph URL: https://github.com/simstudioai/sim/pull/5600
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:67916507-6f27-a77b-8a04-0e49dc213d6b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B338:14F05:A3EF81:E90F6C:6A638061 |
| html-safe-nonce | 8733ea539b1205bfab820087e5b3562a5809b6e1b3d7ab8e0b79ec8130165204 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMzM4OjE0RjA1OkEzRUY4MTpFOTBGNkM6NkE2MzgwNjEiLCJ2aXNpdG9yX2lkIjoiODUxMTY3OTU1NTIxMjM3ODIwOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 54654758f8c57e83c16110371304686b36bb726481441cb5f6885b3d3305c490 |
| hovercard-subject-tag | pull_request:4036475550 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/5600/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary The chat OTP verify endpoint (PUT /api/chat/[identifier]/otp) minted the deployment auth cookie using the chat's current authType without re-checking it was still email, unlike the sib... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | e4fb64aef87da454ec25b158147f7f5f14aef29216e5ca1612c2e48faa599d1f |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e839936ba5faffb9c836dda1cf4729d50c88a32e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width