aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework/Middleware
diff options
context:
space:
mode:
authorHolger Hees <holger.hees@gmail.com>2020-01-13 17:53:08 +0100
committerMorris Jobke <hey@morrisjobke.de>2020-07-06 21:34:46 +0200
commite70249e0896c49cd04365dc7bd088dab8bc6d5dd (patch)
treef3b4b97e3324ab6bc76c0771ee6fda03fd9ef2e8 /lib/private/AppFramework/Middleware
parentb2959d7c86e39bd0064f89dab0912c28334d56ab (diff)
downloadnextcloud-server-e70249e0896c49cd04365dc7bd088dab8bc6d5dd.tar.gz
nextcloud-server-e70249e0896c49cd04365dc7bd088dab8bc6d5dd.zip
Update SecurityMiddleware.php
OC::$WEBROOT can be empty in case if your nextcloud installation has no url prefix. This will result in an empty Location Header. in other areas OC::$WEBROOT is always used together with an /
Diffstat (limited to 'lib/private/AppFramework/Middleware')
-rw-r--r--lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php
index 5eb1d7f30be..089f3589454 100644
--- a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php
@@ -211,7 +211,7 @@ class SecurityMiddleware extends Middleware {
public function afterException($controller, $methodName, \Exception $exception): Response {
if ($exception instanceof SecurityException) {
if ($exception instanceof StrictCookieMissingException) {
- return new RedirectResponse(\OC::$WEBROOT);
+ return new RedirectResponse(\OC::$WEBROOT . '/');
}
if (stripos($this->request->getHeader('Accept'),'html') === false) {
$response = new JSONResponse(