Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

fix[Op#52605]: Do not use contested requestSubmit form action

Kabiru Mwenjab372fdd2163f
diff --git a/frontend/src/stimulus/controllers/dynamic/storages/oauth-access-grant-nudge-modal.controller.ts b/frontend/src/stimulus/controllers/dynamic/storages/oauth-access-grant-nudge-modal.controller.ts
index 335c8fd6c0c..18280135f4c 100644
--- a/frontend/src/stimulus/controllers/dynamic/storages/oauth-access-grant-nudge-modal.controller.ts
+++ b/frontend/src/stimulus/controllers/dynamic/storages/oauth-access-grant-nudge-modal.controller.ts
@@ -69,7 +69,9 @@ export default class OAuthAccessGrantNudgeModalController extends Controller<HTM
evt.preventDefault();
this.activateLoadingState();
- this.requestAccessFormTarget.requestSubmit();
+ // NOTE: Automated requestAccessFormTarget.requestSubmit() is not possible due to CSP restrictions
+ // See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/form-action
+ window.location.href = this.requestAccessFormTarget.action;
}
// Hide the request access button and show the loading indicator