Language: TypeScript
Label: safe
CWE: CWE-863 \u2014 Incorrect Authorization
The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions.

Code:
        cancel: !url.href.startsWith(rootFileURL)
      });
    } else if (url.origin === 'https://extensions.turbowarp.org') {
      // Rewrite extensions.turbowarp.org to the offline cache.
      callback({
        redirectURL: `tw-extensions://${url.pathname}`
      });
    } else {
      // This should never happen.
      callback({});
    }
  });