瀏覽代碼

Updated webauthn config

Will Browning 3 年之前
父節點
當前提交
5ee6abf69b

+ 5 - 3
app/Console/Commands/ReceiveEmail.php

@@ -371,7 +371,7 @@ class ReceiveEmail extends Command
             }
 
             if (isset($user)) {
-                $user->failedDeliveries()->create([
+                $failedDelivery = $user->failedDeliveries()->create([
                     'recipient_id' => $recipient->id ?? null,
                     'alias_id' => $alias->id ?? null,
                     'bounce_type' => $bounceType,
@@ -384,8 +384,10 @@ class ReceiveEmail extends Command
                 ]);
 
                 if (isset($alias)) {
-                    // Decrement the alias forward count due to the failed delivery
-                    $alias->decrement('emails_forwarded');
+                    // Decrement the alias forward count due to failed delivery
+                    if ($failedDelivery->email_type === 'F' && $alias->emails_forwarded > 0) {
+                        $alias->decrement('emails_forwarded');
+                    }
                 }
             } else {
                 Log::info([

+ 5 - 0
app/Http/Controllers/Auth/WebauthnController.php

@@ -3,6 +3,7 @@
 namespace App\Http\Controllers\Auth;
 
 use App\Actions\RegisterKeyStore;
+use App\Facades\Webauthn as WebauthnFacade;
 use App\Models\WebauthnKey;
 use Illuminate\Database\Eloquent\ModelNotFoundException;
 use Illuminate\Http\Request;
@@ -122,6 +123,10 @@ class WebauthnController extends ControllersWebauthnController
                 ->findOrFail($webauthnKeyId)
                 ->delete();
 
+            if (! WebauthnFacade::hasKey(user())) {
+                WebauthnFacade::logout();
+            }
+
             return Response::json([
                 'deleted' => true,
                 'id' => $webauthnKeyId,

+ 6 - 6
composer.lock

@@ -11456,16 +11456,16 @@
         },
         {
             "name": "sebastian/global-state",
-            "version": "5.0.3",
+            "version": "5.0.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/global-state.git",
-                "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49"
+                "reference": "19c519631c5a511b7ed0ad64a6713fdb3fd25fe4"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49",
-                "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49",
+                "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/19c519631c5a511b7ed0ad64a6713fdb3fd25fe4",
+                "reference": "19c519631c5a511b7ed0ad64a6713fdb3fd25fe4",
                 "shasum": ""
             },
             "require": {
@@ -11508,7 +11508,7 @@
             ],
             "support": {
                 "issues": "https://github.com/sebastianbergmann/global-state/issues",
-                "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3"
+                "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.4"
             },
             "funding": [
                 {
@@ -11516,7 +11516,7 @@
                     "type": "github"
                 }
             ],
-            "time": "2021-06-11T13:31:12+00:00"
+            "time": "2022-02-10T07:01:19+00:00"
         },
         {
             "name": "sebastian/lines-of-code",

+ 2 - 2
config/version.yml

@@ -4,10 +4,10 @@ current:
   label: v
   major: 0
   minor: 9
-  patch: 0
+  patch: 1
   prerelease: ''
   buildmetadata: ''
-  commit: de2711
+  commit: 3044d9
   timestamp:
     year: 2020
     month: 10

+ 1 - 1
config/webauthn.php

@@ -226,6 +226,6 @@ return [
     |
     */
 
-    'userless' => 'preferred',
+    'userless' => 'null',
 
 ];

+ 26 - 26
package-lock.json

@@ -1900,9 +1900,9 @@
             "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ=="
         },
         "node_modules/@types/node": {
-            "version": "17.0.16",
-            "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.16.tgz",
-            "integrity": "sha512-ydLaGVfQOQ6hI1xK2A5nVh8bl0OGoIfYMxPWHqqYe9bTkWCfqiVvZoh2I/QF2sNSkZzZyROBoTefIEI+PB6iIA=="
+            "version": "17.0.17",
+            "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.17.tgz",
+            "integrity": "sha512-e8PUNQy1HgJGV3iU/Bp2+D/DXh3PYeyli8LgIwsQcs1Ar1LoaWHSIT6Rw+H2rNJmiq6SNWiDytfx8+gYj7wDHw=="
         },
         "node_modules/@types/parse-json": {
             "version": "4.0.0",
@@ -2937,9 +2937,9 @@
             }
         },
         "node_modules/caniuse-lite": {
-            "version": "1.0.30001310",
-            "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001310.tgz",
-            "integrity": "sha512-cb9xTV8k9HTIUA3GnPUJCk0meUnrHL5gy5QePfDjxHyNBcnzPzrHFv5GqfP7ue5b1ZyzZL0RJboD6hQlPXjhjg==",
+            "version": "1.0.30001311",
+            "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001311.tgz",
+            "integrity": "sha512-mleTFtFKfykEeW34EyfhGIFjGCqzhh38Y0LhdQ9aWF+HorZTtdgKV/1hEE0NlFkG2ubvisPV6l400tlbPys98A==",
             "funding": {
                 "type": "opencollective",
                 "url": "https://opencollective.com/browserslist"
@@ -4049,9 +4049,9 @@
             "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
         },
         "node_modules/electron-to-chromium": {
-            "version": "1.4.67",
-            "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.67.tgz",
-            "integrity": "sha512-A6a2jEPLueEDfb7kvh7/E94RKKnIb01qL+4I7RFxtajmo+G9F5Ei7HgY5PRbQ4RDrh6DGDW66P0hD5XI2nRAcg=="
+            "version": "1.4.68",
+            "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.68.tgz",
+            "integrity": "sha512-cId+QwWrV8R1UawO6b9BR1hnkJ4EJPCPAr4h315vliHUtVUJDk39Sg1PMNnaWKfj5x+93ssjeJ9LKL6r8LaMiA=="
         },
         "node_modules/elliptic": {
             "version": "6.5.4",
@@ -5735,9 +5735,9 @@
             }
         },
         "node_modules/listr2": {
-            "version": "4.0.2",
-            "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.2.tgz",
-            "integrity": "sha512-YcgwfCWpvPbj9FLUGqvdFvd3hrFWKpOeuXznRgfWEJ7RNr8b/IKKIKZABHx3aU+4CWN/iSAFFSReziQG6vTeIA==",
+            "version": "4.0.4",
+            "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.4.tgz",
+            "integrity": "sha512-vJOm5KD6uZXjSsrwajr+mNacIjf87gWvlBEltPWLbTkslUscWAzquyK4xfe9Zd4RDgO5nnwFyV06FC+uVR+5mg==",
             "dev": true,
             "dependencies": {
                 "cli-truncate": "^2.1.0",
@@ -5745,7 +5745,7 @@
                 "log-update": "^4.0.0",
                 "p-map": "^4.0.0",
                 "rfdc": "^1.3.0",
-                "rxjs": "^7.5.2",
+                "rxjs": "^7.5.4",
                 "through": "^2.3.8",
                 "wrap-ansi": "^7.0.0"
             },
@@ -10834,9 +10834,9 @@
             "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ=="
         },
         "@types/node": {
-            "version": "17.0.16",
-            "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.16.tgz",
-            "integrity": "sha512-ydLaGVfQOQ6hI1xK2A5nVh8bl0OGoIfYMxPWHqqYe9bTkWCfqiVvZoh2I/QF2sNSkZzZyROBoTefIEI+PB6iIA=="
+            "version": "17.0.17",
+            "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.17.tgz",
+            "integrity": "sha512-e8PUNQy1HgJGV3iU/Bp2+D/DXh3PYeyli8LgIwsQcs1Ar1LoaWHSIT6Rw+H2rNJmiq6SNWiDytfx8+gYj7wDHw=="
         },
         "@types/parse-json": {
             "version": "4.0.0",
@@ -11687,9 +11687,9 @@
             }
         },
         "caniuse-lite": {
-            "version": "1.0.30001310",
-            "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001310.tgz",
-            "integrity": "sha512-cb9xTV8k9HTIUA3GnPUJCk0meUnrHL5gy5QePfDjxHyNBcnzPzrHFv5GqfP7ue5b1ZyzZL0RJboD6hQlPXjhjg=="
+            "version": "1.0.30001311",
+            "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001311.tgz",
+            "integrity": "sha512-mleTFtFKfykEeW34EyfhGIFjGCqzhh38Y0LhdQ9aWF+HorZTtdgKV/1hEE0NlFkG2ubvisPV6l400tlbPys98A=="
         },
         "chalk": {
             "version": "4.1.2",
@@ -12521,9 +12521,9 @@
             "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
         },
         "electron-to-chromium": {
-            "version": "1.4.67",
-            "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.67.tgz",
-            "integrity": "sha512-A6a2jEPLueEDfb7kvh7/E94RKKnIb01qL+4I7RFxtajmo+G9F5Ei7HgY5PRbQ4RDrh6DGDW66P0hD5XI2nRAcg=="
+            "version": "1.4.68",
+            "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.68.tgz",
+            "integrity": "sha512-cId+QwWrV8R1UawO6b9BR1hnkJ4EJPCPAr4h315vliHUtVUJDk39Sg1PMNnaWKfj5x+93ssjeJ9LKL6r8LaMiA=="
         },
         "elliptic": {
             "version": "6.5.4",
@@ -13718,9 +13718,9 @@
             }
         },
         "listr2": {
-            "version": "4.0.2",
-            "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.2.tgz",
-            "integrity": "sha512-YcgwfCWpvPbj9FLUGqvdFvd3hrFWKpOeuXznRgfWEJ7RNr8b/IKKIKZABHx3aU+4CWN/iSAFFSReziQG6vTeIA==",
+            "version": "4.0.4",
+            "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.4.tgz",
+            "integrity": "sha512-vJOm5KD6uZXjSsrwajr+mNacIjf87gWvlBEltPWLbTkslUscWAzquyK4xfe9Zd4RDgO5nnwFyV06FC+uVR+5mg==",
             "dev": true,
             "requires": {
                 "cli-truncate": "^2.1.0",
@@ -13728,7 +13728,7 @@
                 "log-update": "^4.0.0",
                 "p-map": "^4.0.0",
                 "rfdc": "^1.3.0",
-                "rxjs": "^7.5.2",
+                "rxjs": "^7.5.4",
                 "through": "^2.3.8",
                 "wrap-ansi": "^7.0.0"
             },