Browse Source
Do not redirect if requested CSS can not be found
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
pull/33174/head
Christoph Wurst
4 years ago
No known key found for this signature in database
GPG Key ID: CC42AC2A7F0E56D8
1 changed files with
9 additions and
0 deletions
-
lib/base.php
|
|
|
@ -1055,6 +1055,15 @@ class OC { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// Handle resources that can't be found
|
|
|
|
// This prevents browsers from redirecting to the default page and then
|
|
|
|
// attempting to parse HTML as CSS and similar.
|
|
|
|
$destinationHeader = $request->getHeader('Sec-Fetch-Dest'); |
|
|
|
if (in_array($destinationHeader, ['font', 'script', 'style'])) { |
|
|
|
http_response_code(404); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// Someone is logged in
|
|
|
|
if (\OC::$server->getUserSession()->isLoggedIn()) { |
|
|
|
OC_App::loadApps(); |
|
|
|
|