Skip to content
Snippets Groups Projects
Unverified Commit 6ac89081 authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Add exemptions for incompatible UAs

Some user agents are notorious and don't really properly follow HTTP
 specifications. For those, have an automated opt-out. Since the protection
for remote.php is applied in base.php as starting point we need to opt out
here.
parent fd6ed3aa
No related branches found
No related tags found
No related merge requests found
...@@ -506,8 +506,22 @@ class OC { ...@@ -506,8 +506,22 @@ class OC {
* also we can't directly interfere with PHP's session mechanism. * also we can't directly interfere with PHP's session mechanism.
*/ */
private static function performSameSiteCookieProtection() { private static function performSameSiteCookieProtection() {
$request = \OC::$server->getRequest();
// Some user agents are notorious and don't really properly follow HTTP
// specifications. For those, have an automated opt-out. Since the protection
// for remote.php is applied in base.php as starting point we need to opt out
// here.
$incompatibleUserAgents = [
// OS X Finder
'/^WebDAVFS/',
];
if($request->isUserAgent($incompatibleUserAgents)) {
return;
}
if(count($_COOKIE) > 0) { if(count($_COOKIE) > 0) {
$request = \OC::$server->getRequest();
$requestUri = $request->getScriptName(); $requestUri = $request->getScriptName();
$processingScript = explode('/', $requestUri); $processingScript = explode('/', $requestUri);
$processingScript = $processingScript[count($processingScript)-1]; $processingScript = $processingScript[count($processingScript)-1];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment