Completed
Push — stable13 ( 14c841...de761e )
by Roeland
09:51
created
core/templates/loginflow/authpicker.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 	<h2><?php p($l->t('Account access')) ?></h2>
32 32
 	<p class="info">
33 33
 		<?php print_unescaped($l->t('You are about to grant %s access to your %s account.', [
34
-								'<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>',
34
+								'<strong>'.\OCP\Util::sanitizeHTML($_['client']).'</strong>',
35 35
 								\OCP\Util::sanitizeHTML($_['instanceName'])
36 36
 							])) ?>
37 37
 	</p>
@@ -59,6 +59,6 @@  discard block
 block discarded – undo
59 59
 	</form>
60 60
 </div>
61 61
 
62
-<?php if(empty($_['oauthState'])): ?>
62
+<?php if (empty($_['oauthState'])): ?>
63 63
 <a id="app-token-login" class="warning" href="#"><?php p($l->t('Alternative login using app token')) ?></a>
64 64
 <?php endif; ?>
Please login to merge, or discard this patch.
core/Controller/ClientFlowLoginController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 	 */
125 125
 	private function isValidToken($stateToken) {
126 126
 		$currentToken = $this->session->get(self::stateName);
127
-		if(!is_string($stateToken) || !is_string($currentToken)) {
127
+		if (!is_string($stateToken) || !is_string($currentToken)) {
128 128
 			return false;
129 129
 		}
130 130
 		return hash_equals($currentToken, $stateToken);
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 	public function showAuthPickerPage($clientIdentifier = '') {
159 159
 		$clientName = $this->getClientName();
160 160
 		$client = null;
161
-		if($clientIdentifier !== '') {
161
+		if ($clientIdentifier !== '') {
162 162
 			$client = $this->clientMapper->getByIdentifier($clientIdentifier);
163 163
 			$clientName = $client->getName();
164 164
 		}
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 	 */
217 217
 	public function redirectPage($stateToken = '',
218 218
 								 $clientIdentifier = '') {
219
-		if(!$this->isValidToken($stateToken)) {
219
+		if (!$this->isValidToken($stateToken)) {
220 220
 			return $this->stateTokenForbiddenResponse();
221 221
 		}
222 222
 
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 	 */
244 244
 	public function generateAppPassword($stateToken,
245 245
 										$clientIdentifier = '') {
246
-		if(!$this->isValidToken($stateToken)) {
246
+		if (!$this->isValidToken($stateToken)) {
247 247
 			$this->session->remove(self::stateName);
248 248
 			return $this->stateTokenForbiddenResponse();
249 249
 		}
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 
275 275
 		$clientName = $this->getClientName();
276 276
 		$client = false;
277
-		if($clientIdentifier !== '') {
277
+		if ($clientIdentifier !== '') {
278 278
 			$client = $this->clientMapper->getByIdentifier($clientIdentifier);
279 279
 			$clientName = $client->getName();
280 280
 		}
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 			IToken::DO_NOT_REMEMBER
292 292
 		);
293 293
 
294
-		if($client) {
294
+		if ($client) {
295 295
 			$code = $this->random->generate(128, ISecureRandom::CHAR_UPPER.ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_DIGITS);
296 296
 			$accessToken = new AccessToken();
297 297
 			$accessToken->setClientId($client->getId());
@@ -327,8 +327,8 @@  discard block
 block discarded – undo
327 327
 			}
328 328
 
329 329
 
330
-			$serverPath = $protocol . "://" . $this->request->getServerHost() . $serverPostfix;
331
-			$redirectUri = 'nc://login/server:' . $serverPath . '&user:' . urlencode($loginName) . '&password:' . urlencode($token);
330
+			$serverPath = $protocol."://".$this->request->getServerHost().$serverPostfix;
331
+			$redirectUri = 'nc://login/server:'.$serverPath.'&user:'.urlencode($loginName).'&password:'.urlencode($token);
332 332
 		}
333 333
 
334 334
 		// Clear the token from the login here
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 			return $this->stateTokenForbiddenResponse();
346 346
 		}
347 347
 
348
-		$redirectUri = 'nc://login/server:' . $this->getServerPath() . '&user:' . urlencode($user) . '&password:' . urlencode($password);
348
+		$redirectUri = 'nc://login/server:'.$this->getServerPath().'&user:'.urlencode($user).'&password:'.urlencode($password);
349 349
 		return new Http\RedirectResponse($redirectUri);
350 350
 	}
351 351
 
@@ -364,6 +364,6 @@  discard block
 block discarded – undo
364 364
 				$protocol = 'https';
365 365
 			}
366 366
 		}
367
-		return $protocol . "://" . $this->request->getServerHost() . $serverPostfix;
367
+		return $protocol."://".$this->request->getServerHost().$serverPostfix;
368 368
 	}
369 369
 }
Please login to merge, or discard this patch.