Passed
Push — master ( 2ef946...43dd5b )
by Jaime Pérez
03:57
created
www/managetoken.php 1 patch
Switch Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -26,18 +26,18 @@
 block discarded – undo
26 26
     throw new Exception("Attempt to access the token management page unauthenticated.");
27 27
 }
28 28
 switch ($_POST['submit']) {
29
-    case "NEVERMIND":
30
-        Auth\ProcessingChain::resumeProcessing($state);
31
-        break;
32
-    case "DELETE":
33
-        if ($state['FIDO2AuthSuccessful'] == $_POST['credId']) {
34
-            throw new Exception("Attempt to delete the currently used credential despite UI preventing this.");
35
-        }
36
-        $store = $state['webauthn:store'];
37
-        $store->deleteTokenData($_POST['credId']);
38
-        Auth\ProcessingChain::resumeProcessing($state);
39
-        break;
40
-    default:
41
-        throw new Exception("Unknown submit button state.");
29
+        case "NEVERMIND":
30
+            Auth\ProcessingChain::resumeProcessing($state);
31
+            break;
32
+        case "DELETE":
33
+            if ($state['FIDO2AuthSuccessful'] == $_POST['credId']) {
34
+                throw new Exception("Attempt to delete the currently used credential despite UI preventing this.");
35
+            }
36
+            $store = $state['webauthn:store'];
37
+            $store->deleteTokenData($_POST['credId']);
38
+            Auth\ProcessingChain::resumeProcessing($state);
39
+            break;
40
+        default:
41
+            throw new Exception("Unknown submit button state.");
42 42
 }
43 43
 
Please login to merge, or discard this patch.
templates/webauthn.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,8 +17,11 @@  discard block
 block discarded – undo
17 17
                 <?php foreach($this->data['FIDO2Tokens'] as $index => $this->data['token']): ?>
18 18
                     <?php if($this->data['FIDO2AuthSuccessful'] == false or $this->data['FIDO2AuthSuccessful'] != $this->data['token'][0]): ?>
19 19
                         <li class='othertoken'><?php echo htmlspecialchars($this->data['token'][3]); ?></li>
20
-                        <?php else: ?>
21
-                        <li class='currenttoken'><?php echo htmlspecialchars($this->data['token'][3]); ?> <?php echo htmlspecialchars($this->t('{webauthn:webauthn:currentToken}')); ?></li>
20
+                        <?php else {
21
+    : ?>
22
+                        <li class='currenttoken'><?php echo htmlspecialchars($this->data['token'][3]);
23
+}
24
+?> <?php echo htmlspecialchars($this->t('{webauthn:webauthn:currentToken}')); ?></li>
22 25
                         <?php endif; ?>
23 26
                     <?php endforeach;?>
24 27
             </ul>
@@ -68,8 +71,11 @@  discard block
 block discarded – undo
68 71
             <input type='hidden' id='operation' name='operation' value='AUTH'/>
69 72
             <input type='checkbox' id='credentialChange' name='credentialChange'><?php if(((is_array($this->data['FIDO2Tokens']) || $this->data['FIDO2Tokens'] instanceof Countable)?count($this->data['FIDO2Tokens']):strlen($this->data['FIDO2Tokens'])) < 2): ?>
70 73
             <?php echo htmlspecialchars($this->t('{webauthn:webauthn:wantsAdd}')); ?>
71
-        <?php else: ?>
72
-            <?php echo htmlspecialchars($this->t('{webauthn:webauthn:wantsModification}')); ?>
74
+        <?php else {
75
+    : ?>
76
+            <?php echo htmlspecialchars($this->t('{webauthn:webauthn:wantsModification}'));
77
+}
78
+?>
73 79
         <?php endif; ?></input><br/>
74 80
         <button type='button' onClick="<?php echo $this->data['authForm']; ?>" onsubmit='false' ><?php echo htmlspecialchars($this->t('{webauthn:webauthn:authTokenButton}')); ?></button>
75 81
     </form>
Please login to merge, or discard this patch.