feat: Accounts_OAuth_Flow_Engine Setting#40876
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx,js}📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
Files:
🧠 Learnings (3)📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-05-06T12:21:44.083ZApplied to files:
🔇 Additional comments (2)
WalkthroughAdds a selectable ChangesOAuth Flow Engine Dual-Mode Setup
Sequence DiagramsequenceDiagram
participant LoginButton as LoginServicesButton
participant Client as Browser
participant Server as Rocket.Chat Server
participant Passport as Passport
participant CustomOAuth as CustomOAuth.Handler
participant Provider as OAuth Provider
LoginButton->>Client: user clicks login
Client->>Server: GET /_oauth/:provider (or POST login)
Server->>Passport: passport.authenticate(...) (if flow engine === 'passport')
alt passport flow
Passport->>Provider: OAuth handshake
Provider-->>Passport: callback
Passport-->>Server: auth result
else legacy flow
Server->>CustomOAuth: CustomOAuth.configure/handle
CustomOAuth->>Provider: OAuth handshake
Provider-->>CustomOAuth: callback
CustomOAuth-->>Server: auth result
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
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. Comment |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## feat/phishing-resistant-mfa #40876 +/- ##
==============================================================
Coverage ? 69.63%
==============================================================
Files ? 3339
Lines ? 123320
Branches ? 21981
==============================================================
Hits ? 85876
Misses ? 34077
Partials ? 3367
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/meteor/app/nextcloud/server/lib.ts (1)
23-45:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winMissing
passport.unuse('nextcloud')before reconfiguration.Unlike the other provider implementations (Dolphin, Drupal, GitLab, WordPress), this file does not call
passport.unuse('nextcloud')at the start of the configuration function. When switching frompassporttometeorflow engine, the stale Passport strategy will remain registered, potentially causing unexpected behavior.🔧 Proposed fix
+import passport from 'passport'; + function configureNextcloudOAuth(): void { + passport.unuse('nextcloud'); + const enabled = settings.get<boolean>('Accounts_OAuth_Nextcloud');🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/meteor/app/nextcloud/server/lib.ts` around lines 23 - 45, In configureNextcloudOAuth add a step to unregister any existing Passport strategy for 'nextcloud' before applying new configuration: call passport.unuse('nextcloud') (ensure passport is imported or available) at the start of the function so stale Passport strategies are removed when switching flow engines; keep this in place whether you then call addPassportCustomOAuth('nextcloud', config) or Nextcloud.configure(config) to match the pattern used by other providers.
🧹 Nitpick comments (2)
apps/meteor/server/settings/oauth.ts (2)
10-11: ⚡ Quick winClarify user-facing labels for the OAuth flow options.
The labels
'Meteor'and'New flow'may not clearly convey the choice to administrators.'New flow'is particularly vague—consider more descriptive labels such as'Legacy (Meteor)'and'Modern (Passport)'or use i18n keys for proper localization and clarity.📝 Suggested improvement
await this.add('Accounts_OAuth_Flow_Engine', 'meteor', { type: 'select', values: [ - { key: 'meteor', i18nLabel: 'Meteor' }, - { key: 'passport', i18nLabel: 'New flow' }, + { key: 'meteor', i18nLabel: 'Legacy (Meteor)' }, + { key: 'passport', i18nLabel: 'Modern (Passport)' }, ], public: true, i18nDescription: 'Accounts_OAuth_Flow_Engine_Description', });Or use i18n keys for proper localization:
await this.add('Accounts_OAuth_Flow_Engine', 'meteor', { type: 'select', values: [ - { key: 'meteor', i18nLabel: 'Meteor' }, - { key: 'passport', i18nLabel: 'New flow' }, + { key: 'meteor', i18nLabel: 'Accounts_OAuth_Flow_Engine_Meteor' }, + { key: 'passport', i18nLabel: 'Accounts_OAuth_Flow_Engine_Passport' }, ], public: true, i18nDescription: 'Accounts_OAuth_Flow_Engine_Description', });🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/meteor/server/settings/oauth.ts` around lines 10 - 11, The user-facing labels for the OAuth flow options are ambiguous; update the entries in the options array (the objects with key: 'meteor' and key: 'passport') to use clearer labels such as "Legacy (Meteor)" and "Modern (Passport)" or replace the hardcoded i18nLabel strings with appropriate i18n keys (e.g., i18nLabel: 'oauth.label.legacy' / 'oauth.label.modern') so administrators see a clear, localizable choice between the Meteor and Passport flows; ensure you update any corresponding translation files if you opt for i18n keys.
7-15: Confirm i18n description key + refine label wording
i18nDescription: 'Accounts_OAuth_Flow_Engine_Description'is present inpackages/i18n/src/locales/en.i18n.json, so the admin UI description won’t be missing.- Consider replacing the
New flowoption label with more descriptive text (e.g., “Passport-based flow”) to improve admin UX.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/meteor/server/settings/oauth.ts` around lines 7 - 15, Confirm that the i18n key Accounts_OAuth_Flow_Engine_Description exists (it does) and update the select option label for key 'passport' in the add call for 'Accounts_OAuth_Flow_Engine' to a more descriptive string such as "Passport-based flow" (or similar) to improve admin UX; locate the values array inside the await this.add('Accounts_OAuth_Flow_Engine', 'meteor', { ... }) call and replace the i18nLabel or displayed label for the { key: 'passport', i18nLabel: 'New flow' } entry accordingly, ensuring any corresponding i18n key is added/updated if you change to a translatable label.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/meteor/app/wordpress/server/lib.ts`:
- Around line 72-78: The WordPress passport branch passes a config missing
clientId/clientSecret to addPassportCustomOAuth, so update the code that
prepares WordPress's config (the same way other providers do) to read clientId
and clientSecret from settings (via settings.get) and merge them into the config
object before calling addPassportCustomOAuth(serviceKey, config); ensure the
final object contains clientId and clientSecret keys so addPassportCustomOAuth's
early-return check finds them.
In `@apps/meteor/server/configuration/configurePassport.ts`:
- Around line 25-33: The current configureOAuth function short-circuits when
Accounts_OAuth_Flow_Engine !== 'passport', leaving any previously-registered
Passport state active; update configureOAuth to detect a transition away from
'passport' and perform teardown: call passport.unuse for any strategies
previously registered (track strategy names created by
createOAuthServiceConfig/configureOAuthServices or derive them from
getOAuthServices), remove or disable Passport-specific routes/middleware that
configureOAuthServices added, and ensure future calls re-register cleanly when
switching back; reference configureOAuth, getOAuthServices,
createOAuthServiceConfig, configureOAuthServices and use passport.unuse (and
route-level gating cleanup) to implement the teardown path.
In `@apps/meteor/server/lib/oauth/configureOAuthServices.ts`:
- Line 84: Remove the noisy console.log in the OAuth callback middleware: locate
the "console.log('In check middleware')" call inside the OAuth callback handling
(the middleware registered in configureOAuthServices / the "check" middleware)
and delete it, or replace it with a conditional debug/log.debug call controlled
by environment or log level if you need traceability; ensure no unconditional
console logging remains in that middleware so production auth callbacks stay
quiet.
---
Outside diff comments:
In `@apps/meteor/app/nextcloud/server/lib.ts`:
- Around line 23-45: In configureNextcloudOAuth add a step to unregister any
existing Passport strategy for 'nextcloud' before applying new configuration:
call passport.unuse('nextcloud') (ensure passport is imported or available) at
the start of the function so stale Passport strategies are removed when
switching flow engines; keep this in place whether you then call
addPassportCustomOAuth('nextcloud', config) or Nextcloud.configure(config) to
match the pattern used by other providers.
---
Nitpick comments:
In `@apps/meteor/server/settings/oauth.ts`:
- Around line 10-11: The user-facing labels for the OAuth flow options are
ambiguous; update the entries in the options array (the objects with key:
'meteor' and key: 'passport') to use clearer labels such as "Legacy (Meteor)"
and "Modern (Passport)" or replace the hardcoded i18nLabel strings with
appropriate i18n keys (e.g., i18nLabel: 'oauth.label.legacy' /
'oauth.label.modern') so administrators see a clear, localizable choice between
the Meteor and Passport flows; ensure you update any corresponding translation
files if you opt for i18n keys.
- Around line 7-15: Confirm that the i18n key
Accounts_OAuth_Flow_Engine_Description exists (it does) and update the select
option label for key 'passport' in the add call for 'Accounts_OAuth_Flow_Engine'
to a more descriptive string such as "Passport-based flow" (or similar) to
improve admin UX; locate the values array inside the await
this.add('Accounts_OAuth_Flow_Engine', 'meteor', { ... }) call and replace the
i18nLabel or displayed label for the { key: 'passport', i18nLabel: 'New flow' }
entry accordingly, ensuring any corresponding i18n key is added/updated if you
change to a translatable label.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3dcc3eea-364f-4a5c-b26b-d6496c9f28ed
📒 Files selected for processing (12)
apps/meteor/app/dolphin/server/lib.tsapps/meteor/app/drupal/server/lib.tsapps/meteor/app/gitlab/server/lib.tsapps/meteor/app/nextcloud/server/lib.tsapps/meteor/app/wordpress/server/lib.tsapps/meteor/server/configuration/configurePassport.tsapps/meteor/server/lib/oauth/addPassportCustomOAuth.tsapps/meteor/server/lib/oauth/configureOAuthServices.tsapps/meteor/server/settings/oauth.tspackages/i18n/src/locales/en.i18n.jsonpackages/web-ui-registration/src/LoginServices.tsxpackages/web-ui-registration/src/LoginServicesButton.tsx
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation
Files:
packages/web-ui-registration/src/LoginServices.tsxapps/meteor/app/wordpress/server/lib.tsapps/meteor/server/settings/oauth.tsapps/meteor/app/gitlab/server/lib.tspackages/web-ui-registration/src/LoginServicesButton.tsxapps/meteor/app/drupal/server/lib.tsapps/meteor/app/dolphin/server/lib.tsapps/meteor/server/lib/oauth/configureOAuthServices.tsapps/meteor/app/nextcloud/server/lib.tsapps/meteor/server/lib/oauth/addPassportCustomOAuth.tsapps/meteor/server/configuration/configurePassport.ts
🧠 Learnings (4)
📚 Learning: 2026-03-27T14:52:56.865Z
Learnt from: dougfabris
Repo: RocketChat/Rocket.Chat PR: 39892
File: apps/meteor/client/views/room/contextualBar/Threads/Thread.tsx:150-155
Timestamp: 2026-03-27T14:52:56.865Z
Learning: In Rocket.Chat, there are two different `ModalBackdrop` components with different prop APIs. During review, confirm the import source: (1) `rocket.chat/fuselage` `ModalBackdrop` uses `ModalBackdropProps` based on `BoxProps` (so it supports `onClick` and other Box/DOM props) and does not have an `onDismiss` prop; (2) `rocket.chat/ui-client` `ModalBackdrop` uses a narrower props interface like `{ children?: ReactNode; onDismiss?: () => void }` and handles Escape keypress and outside mouse-up, and it does not forward arbitrary DOM props such as `onClick`. Flag mismatched props (e.g., `onDismiss` passed to the fuselage component or `onClick` passed to the ui-client component) and ensure the usage matches the correct component being imported.
Applied to files:
packages/web-ui-registration/src/LoginServices.tsxpackages/web-ui-registration/src/LoginServicesButton.tsx
📚 Learning: 2026-05-06T12:21:44.083Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 40256
File: apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx:121-149
Timestamp: 2026-05-06T12:21:44.083Z
Learning: Field wrappers in rocket.chat/fuselage-forms (Field, FieldLabel, FieldRow, FieldError, FieldHint) auto-create htmlFor/id associations, aria-describedby, and role="alert" for errors. Do not manually set htmlFor, id, aria-describedby, or role attributes when using these wrappers. This automatic wiring does not apply to plain rocket.chat/fuselage components, which require explicit ID wiring per the accessibility docs. In code reviews, prefer using fuselage-forms wrappers for form fields and verify there is no unnecessary manual ID/aria wiring in files that use these wrappers. If a component uses plain fuselage components, ensure proper id wiring as per docs.
Applied to files:
packages/web-ui-registration/src/LoginServices.tsxapps/meteor/app/wordpress/server/lib.tsapps/meteor/server/settings/oauth.tsapps/meteor/app/gitlab/server/lib.tspackages/web-ui-registration/src/LoginServicesButton.tsxapps/meteor/app/drupal/server/lib.tsapps/meteor/app/dolphin/server/lib.tsapps/meteor/server/lib/oauth/configureOAuthServices.tsapps/meteor/app/nextcloud/server/lib.tsapps/meteor/server/lib/oauth/addPassportCustomOAuth.tsapps/meteor/server/configuration/configurePassport.ts
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In the Rocket.Chat repository, do not reference Biome lint rules in code review feedback. Biome is not used even if biome.json exists; only reference Biome rules if there is explicit, project-wide usage documented. For TypeScript files, review lint implications without Biome guidance unless the project enables Biome rules.
Applied to files:
apps/meteor/app/wordpress/server/lib.tsapps/meteor/server/settings/oauth.tsapps/meteor/app/gitlab/server/lib.tsapps/meteor/app/drupal/server/lib.tsapps/meteor/app/dolphin/server/lib.tsapps/meteor/server/lib/oauth/configureOAuthServices.tsapps/meteor/app/nextcloud/server/lib.tsapps/meteor/server/lib/oauth/addPassportCustomOAuth.tsapps/meteor/server/configuration/configurePassport.ts
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In this repository (RocketChat/Rocket.Chat), Biome lint rules are not used even if a biome.json exists. When reviewing TypeScript files (e.g., packages/ui-voip/src/providers/useMediaSession.ts), ensure lint suggestions do not reference Biome-specific rules. Rely on general ESLint/TypeScript lint rules and project conventions instead.
Applied to files:
apps/meteor/app/wordpress/server/lib.tsapps/meteor/server/settings/oauth.tsapps/meteor/app/gitlab/server/lib.tsapps/meteor/app/drupal/server/lib.tsapps/meteor/app/dolphin/server/lib.tsapps/meteor/server/lib/oauth/configureOAuthServices.tsapps/meteor/app/nextcloud/server/lib.tsapps/meteor/server/lib/oauth/addPassportCustomOAuth.tsapps/meteor/server/configuration/configurePassport.ts
🔇 Additional comments (10)
packages/i18n/src/locales/en.i18n.json (1)
361-362: LGTM!Also applies to: 7258-7258
packages/web-ui-registration/src/LoginServices.tsx (1)
21-21: LGTM!Also applies to: 56-62
packages/web-ui-registration/src/LoginServicesButton.tsx (1)
23-23: LGTM!Also applies to: 29-29, 35-35, 56-56
apps/meteor/server/configuration/configurePassport.ts (1)
100-102:⚠️ Potential issue | 🟠 Major | ⚡ Quick win
Accounts_OAuth_Flow_Engineis watched twice, causing duplicate reconfiguration.The regex watcher at Line 96 already matches
Accounts_OAuth_Flow_Engine, so Lines 100-102 invokeconfigureOAutha second time per toggle. Since route registration is additive, this can duplicate handlers.Suggested fix
- settings.watch('Accounts_OAuth_Flow_Engine', () => { - configureOAuth(settings); - });> Likely an incorrect or invalid review comment.apps/meteor/server/lib/oauth/addPassportCustomOAuth.ts (1)
50-58: LGTM!apps/meteor/app/dolphin/server/lib.ts (1)
10-10: LGTM!Also applies to: 26-27, 52-59, 63-72
apps/meteor/app/drupal/server/lib.ts (1)
7-7: LGTM!Also applies to: 11-11, 26-27, 43-51, 58-58
apps/meteor/app/gitlab/server/lib.ts (1)
7-7: LGTM!Also applies to: 22-23, 42-50, 64-64
apps/meteor/app/nextcloud/server/lib.ts (1)
5-5: LGTM!Also applies to: 9-9, 21-22, 50-56
apps/meteor/app/wordpress/server/lib.ts (1)
8-8: LGTM!Also applies to: 24-25, 98-99
There was a problem hiding this comment.
5 issues found across 12 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| await this.add('Accounts_OAuth_Flow_Engine', 'meteor', { | ||
| type: 'select', | ||
| values: [ | ||
| { key: 'meteor', i18nLabel: 'Legacy_Meteor_OAuth' }, | ||
| { key: 'passport', i18nLabel: 'Modern_OAuth_System_Browser_and_Deep_Links_Recommended' }, | ||
| ], | ||
| public: true, | ||
| i18nDescription: 'Accounts_OAuth_Flow_Engine_Description', | ||
| }); | ||
|
|
There was a problem hiding this comment.
Sensitive OAuth Credentials (Nextcloud Client Secret and Apple Private Key) Missing secret: true Flag
In Rocket.Chat, settings are registered with metadata that controls how they are handled by the system. The secret: true option is used to mark highly sensitive settings (such as API keys, passwords, and client secrets) so that the platform can apply special protections, such as redacting them in logs, excluding them from certain API responses, or masking them in diagnostic exports.
An analysis of apps/meteor/server/settings/oauth.ts reveals that while almost all OAuth provider secrets (such as Google, GitHub, Facebook, Twitter, and LinkedIn) are correctly registered with the secret: true option, the following two highly sensitive credentials are missing this flag:
Accounts_OAuth_Apple_secretKey(the private key used for Apple Sign-In authentication)Accounts_OAuth_Nextcloud_secret(the client secret used for Nextcloud OAuth authentication)
Because these settings lack the secret: true metadata, they are treated as standard non-sensitive settings. This can lead to the exposure of the Nextcloud Client Secret and the Apple Private Key in plain text in logs, diagnostic reports, or settings export APIs, allowing an attacker with access to these outputs to compromise the OAuth integration or impersonate the server to the identity providers.
Steps to Reproduce
Reviewing apps/meteor/server/settings/oauth.ts shows the discrepancy between Nextcloud/Apple and other OAuth providers:
// Drupal (Correct)
await this.add('Accounts_OAuth_Drupal_secret', '', { type: 'string', enableQuery, secret: true });
// Apple (Vulnerable - missing secret: true)
await this.add('Accounts_OAuth_Apple_secretKey', '', { type: 'string', multiline: true });
// Nextcloud (Vulnerable - missing secret: true)
await this.add('Accounts_OAuth_Nextcloud_secret', '', { type: 'string', enableQuery });Fix with AI
A security vulnerability was found by Hacktron.
File: apps/meteor/server/settings/oauth.ts
Lines: 7-16
Severity: medium
Vulnerability: Sensitive OAuth Credentials (Nextcloud Client Secret and Apple Private Key) Missing secret: true Flag
Description:
In Rocket.Chat, settings are registered with metadata that controls how they are handled by the system. The `secret: true` option is used to mark highly sensitive settings (such as API keys, passwords, and client secrets) so that the platform can apply special protections, such as redacting them in logs, excluding them from certain API responses, or masking them in diagnostic exports.
An analysis of `apps/meteor/server/settings/oauth.ts` reveals that while almost all OAuth provider secrets (such as Google, GitHub, Facebook, Twitter, and LinkedIn) are correctly registered with the `secret: true` option, the following two highly sensitive credentials are missing this flag:
1. `Accounts_OAuth_Apple_secretKey` (the private key used for Apple Sign-In authentication)
2. `Accounts_OAuth_Nextcloud_secret` (the client secret used for Nextcloud OAuth authentication)
Because these settings lack the `secret: true` metadata, they are treated as standard non-sensitive settings. This can lead to the exposure of the Nextcloud Client Secret and the Apple Private Key in plain text in logs, diagnostic reports, or settings export APIs, allowing an attacker with access to these outputs to compromise the OAuth integration or impersonate the server to the identity providers.
Proof of Concept:
Reviewing `apps/meteor/server/settings/oauth.ts` shows the discrepancy between Nextcloud/Apple and other OAuth providers:
```typescript
// Drupal (Correct)
await this.add('Accounts_OAuth_Drupal_secret', '', { type: 'string', enableQuery, secret: true });
// Apple (Vulnerable - missing secret: true)
await this.add('Accounts_OAuth_Apple_secretKey', '', { type: 'string', multiline: true });
// Nextcloud (Vulnerable - missing secret: true)
await this.add('Accounts_OAuth_Nextcloud_secret', '', { type: 'string', enableQuery });
```
Affected Code:
- [oauth.ts:43](https://github.com/RocketChat/Rocket.Chat/blob/master/apps/meteor/server/settings/oauth.ts#L43)
```typescript
await this.add('Accounts_OAuth_Apple_secretKey', '', { type: 'string', multiline: true });
```
- [oauth.ts:113](https://github.com/RocketChat/Rocket.Chat/blob/master/apps/meteor/server/settings/oauth.ts#L113)
```typescript
await this.add('Accounts_OAuth_Nextcloud_secret', '', { type: 'string', enableQuery });
```
Acceptance criteria:
- Acceptance is defined by the **actual reported behavior**, not by tests passing.
- Reproduce the issue, or narrow the exact code path that produces it, *before* changing code. State what you confirmed.
- Fix the underlying cause. Mitigations that paper over the reported behavior do not count as a fix.
- Add a regression test that fails on the unpatched code and passes on the fix. If a regression test is genuinely impractical (e.g. race condition, infra-level issue), say so and explain why.
- Existing tests passing is **not** the bar. Do not declare done on tests-pass theatre.
Only change what is necessary to fix this vulnerability. Do not refactor adjacent code or modify unrelated files.
Triage: Reply !fp <reason> (false positive), !valid (confirmed), or !accepted_risk <reason>. Any other reply is saved as a triage note.
Reason is optional but improves future scans — e.g. !fp internal endpoint, not user-facing.
Proposed changes (including videos or screenshots)
Adds a new setting
Accounts_OAuth_Flow_Engineto toggle between new passport and legacy meteor OAuth flows.Issue(s)
Steps to test or reproduce
Further comments
Due to some limitations on express and how routing works in our app, as of now we don't have a way of unmounting routes and middlewares when the setting is toggled. So this PR works around this issue by skipping the current route and router on basis of setting value.
PRM-50
Summary by CodeRabbit
New Features
Settings
UI
Localization