Skip to content

Conversation

@avinash-0007
Copy link

@avinash-0007 avinash-0007 commented Oct 27, 2023

This Mr solves the issue mention in below ticket
#242

@akhil1508
Copy link

akhil1508 commented Jan 30, 2024

@pulsejet Any update on this?

Signed-off-by: Akhil <akhil@e.email>
@akhil1508
Copy link

akhil1508 commented Apr 15, 2024

  • For the non-OCS routes for e.g. notes API (/apps/notes/api/v0.2/notes) to work we also need a patch for lib/private/AppFramework/Middleware/Security/CORSMiddleware like
--- lib/private/AppFramework/Middleware/Security/CORSMiddleware.php	2024-04-08 08:53:20.410444998 +0530
+++ lib/private/AppFramework/Middleware/Security/CORSMiddleware-new.php	2024-04-09 19:05:21.133629632 +0530
@@ -97,6 +97,10 @@
 			// Allow to use the current session if a CSRF token is provided
 			if ($this->request->passesCSRFCheck()) {
 				return;
+			}			
+			// Skip CORS check for requests with oidc token auth.
+			if ($this->session->getSession() instanceof ISession && $this->session->getSession()->get('is_oidc_token_login') === 1) {
+				return;
 			}
 			// Skip CORS check for requests with AppAPI auth.
 			if ($this->session->getSession() instanceof ISession && $this->session->getSession()->get('app_api') === true) {

@akhil1508
Copy link

akhil1508 commented Apr 15, 2024

@pulsejet I await response from NC devs on nextcloud/user_oidc#836 so we can avoid patching

Signed-off-by: Akhil <akhil@e.email>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants