Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions apps/meteor/app/custom-oauth/server/custom_oauth_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ export class CustomOAuth {

try {
const request = await fetch(`${this.tokenPath}`, {
// SECURITY: URL can only be configured by users with enough privileges. It's ok to disable this check here.
ignoreSsrfValidation: true,
// SECURITY: URL can only be configured by privileged admins. Enforcing SSRF allowlist instead of full bypass.
method: 'POST',
headers,
body: params,
allowList: settings.get('SSRF_Allowlist')
Comment thread
coderabbitai[bot] marked this conversation as resolved.
});

if (!request.ok) {
Expand Down Expand Up @@ -181,8 +181,8 @@ export class CustomOAuth {
}

try {
// SECURITY: URL can only be configured by users with enough privileges. It's ok to disable this check here.
const request = await fetch(`${this.identityPath}`, { method: 'GET', headers, params, ignoreSsrfValidation: true });
// SECURITY: URL can only be configured by privileged admins. Enforcing SSRF allowlist instead of full bypass.
const request = await fetch(`${this.identityPath}`, { method: 'GET', headers, params, allowList: settings.get('SSRF_Allowlist') });

if (!request.ok) {
throw new Error(request.statusText);
Expand Down Expand Up @@ -288,9 +288,8 @@ export class CustomOAuth {
}

try {
// SECURITY: URL can only be configured by users with enough privileges. It's ok to disable this check here.
const request = await fetch(`${this.emailPath}`, { method: 'GET', headers, params, ignoreSsrfValidation: true });

// SECURITY: URL can only be configured by privileged admins. Enforcing SSRF allowlist instead of full bypass.
const request = await fetch(`${this.emailPath}`, { method: 'GET', headers, params, allowList: settings.get('SSRF_Allowlist') });
if (!request.ok) {
throw new Error(request.statusText);
}
Expand Down