mirror of
https://github.com/nextcloud/server.git
synced 2026-02-18 18:28:50 -05:00
Remove SAML hack from base.php
This is no longer required now that https://github.com/nextcloud/user_saml/pull/159 is in Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
271959b1d9
commit
95cc831ed7
1 changed files with 1 additions and 16 deletions
17
lib/base.php
17
lib/base.php
|
|
@ -543,22 +543,7 @@ class OC {
|
|||
$requestUri = $request->getScriptName();
|
||||
$processingScript = explode('/', $requestUri);
|
||||
$processingScript = $processingScript[count($processingScript)-1];
|
||||
// FIXME: In a SAML scenario we don't get any strict or lax cookie
|
||||
// send for the ACS endpoint. Since we have some legacy code in Nextcloud
|
||||
// (direct PHP files) the enforcement of lax cookies is performed here
|
||||
// instead of the middleware.
|
||||
//
|
||||
// This means we cannot exclude some routes from the cookie validation,
|
||||
// which normally is not a problem but is a little bit cumbersome for
|
||||
// this use-case.
|
||||
// Once the old legacy PHP endpoints have been removed we can move
|
||||
// the verification into a middleware and also adds some exemptions.
|
||||
//
|
||||
// Questions about this code? Ask Lukas ;-)
|
||||
$currentUrl = substr(explode('?',$request->getRequestUri(), 2)[0], strlen(\OC::$WEBROOT));
|
||||
if($currentUrl === '/index.php/apps/user_saml/saml/acs' || $currentUrl === '/apps/user_saml/saml/acs') {
|
||||
return;
|
||||
}
|
||||
|
||||
// index.php routes are handled in the middleware
|
||||
if($processingScript === 'index.php') {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue