@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | return $this->checkToken(); |
| 83 | - } catch (NotAuthenticated|MaxDelayReached $e) { |
|
| 83 | + } catch (NotAuthenticated | MaxDelayReached $e) { |
|
| 84 | 84 | $this->throttler->registerAttempt(self::BRUTEFORCE_ACTION, $this->request->getRemoteAddress()); |
| 85 | 85 | throw $e; |
| 86 | 86 | } catch (PreconditionFailed $e) { |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | 'Location', |
| 89 | 89 | $this->urlGenerator->linkToRoute( |
| 90 | 90 | 'files_sharing.share.showShare', |
| 91 | - [ 'token' => $this->getToken() ], |
|
| 91 | + ['token' => $this->getToken()], |
|
| 92 | 92 | ), |
| 93 | 93 | ); |
| 94 | 94 | throw $e; |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | |
| 139 | 139 | // If already authenticated |
| 140 | 140 | if ($this->isShareInSession($share)) { |
| 141 | - return [true, $this->principalPrefix . $token]; |
|
| 141 | + return [true, $this->principalPrefix.$token]; |
|
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | // If the share is protected but user is not authenticated |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | throw new NotAuthenticated(); |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | - return [true, $this->principalPrefix . $token]; |
|
| 150 | + return [true, $this->principalPrefix.$token]; |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | /** |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | if (in_array('XMLHttpRequest', explode(',', $this->request->getHeader('X-Requested-With')))) { |
| 197 | 197 | // do not re-authenticate over ajax, use dummy auth name to prevent browser popup |
| 198 | 198 | http_response_code(401); |
| 199 | - header('WWW-Authenticate: DummyBasic realm="' . $this->realm . '"'); |
|
| 199 | + header('WWW-Authenticate: DummyBasic realm="'.$this->realm.'"'); |
|
| 200 | 200 | throw new NotAuthenticated('Cannot authenticate over ajax calls'); |
| 201 | 201 | } |
| 202 | 202 | |
@@ -115,7 +115,7 @@ |
||
| 115 | 115 | $tokenStored = false; |
| 116 | 116 | $this->session |
| 117 | 117 | ->method('set') |
| 118 | - ->willReturnCallback(function ($key, $value) use (&$tokenStored) { |
|
| 118 | + ->willReturnCallback(function($key, $value) use (&$tokenStored) { |
|
| 119 | 119 | if ($key === AuthPublicShareController::DAV_AUTHENTICATED_FRONTEND) { |
| 120 | 120 | $decoded = json_decode($value, true); |
| 121 | 121 | if (isset($decoded['token']) && $decoded['token'] === 'hash') { |