Ver Fonte

dev: fix cache refresh for invalid origins

KernelDeimos há 3 meses atrás
pai
commit
fbd5ffd85d
1 ficheiros alterados com 7 adições e 1 exclusões
  1. 7 1
      src/backend/src/modules/apps/AppInformationService.js

+ 7 - 1
src/backend/src/modules/apps/AppInformationService.js

@@ -609,7 +609,13 @@ class AppInformationService extends BaseService {
 
             // only count the referral if the origin hashes to the app's uid
             const svc_auth = this.services.get('auth');
-            const expected_uid = await svc_auth.app_uid_from_origin(origin);
+            let expected_uid;
+            try {
+                expected_uid = await svc_auth.app_uid_from_origin(origin);
+            } catch (e) {
+                // This happens if the app origin isn't valid
+                continue;
+            }
             if ( expected_uid !== app.uid ) {
                 continue;
             }