@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | return $this->checkToken(); |
| 80 | - } catch (NotAuthenticated|MaxDelayReached $e) { |
|
| 80 | + } catch (NotAuthenticated | MaxDelayReached $e) { |
|
| 81 | 81 | $this->throttler->registerAttempt(self::BRUTEFORCE_ACTION, $this->request->getRemoteAddress()); |
| 82 | 82 | throw $e; |
| 83 | 83 | } catch (\Exception $e) { |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | // If already authenticated |
| 129 | 129 | if ($this->session->exists(self::DAV_AUTHENTICATED) |
| 130 | 130 | && $this->session->get(self::DAV_AUTHENTICATED) === $share->getId()) { |
| 131 | - return [true, $this->principalPrefix . $token]; |
|
| 131 | + return [true, $this->principalPrefix.$token]; |
|
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | // If the share is protected but user is not authenticated |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | throw new NotAuthenticated(); |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | - return [true, $this->principalPrefix . $token]; |
|
| 140 | + return [true, $this->principalPrefix.$token]; |
|
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | /** |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | if (in_array('XMLHttpRequest', explode(',', $this->request->getHeader('X-Requested-With')))) { |
| 189 | 189 | // do not re-authenticate over ajax, use dummy auth name to prevent browser popup |
| 190 | 190 | http_response_code(401); |
| 191 | - header('WWW-Authenticate: DummyBasic realm="' . $this->realm . '"'); |
|
| 191 | + header('WWW-Authenticate: DummyBasic realm="'.$this->realm.'"'); |
|
| 192 | 192 | throw new NotAuthenticated('Cannot authenticate over ajax calls'); |
| 193 | 193 | } |
| 194 | 194 | |
@@ -86,7 +86,7 @@ |
||
| 86 | 86 | |
| 87 | 87 | $templateName = 'exception'; |
| 88 | 88 | if ($httpCode === 403 || $httpCode === 404 || $httpCode === 429) { |
| 89 | - $templateName = (string)$httpCode; |
|
| 89 | + $templateName = (string) $httpCode; |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | $content = \OCP\Server::get(ITemplateManager::class)->getTemplate('core', $templateName, TemplateResponse::RENDER_AS_GUEST); |