mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-24 02:51:17 -08:00
formatting
This commit is contained in:
1 parent
6ff9c02c39
commit
bc526c83fe
2 files changed
+2
-5
No files matched your search
@@ -104,8 +104,6 @@ describe('parseTauriOidcCallback', () => {
|
||||
});
|
||||
|
||||
it('rejects an unrelated hostname with a login path', () => {
|
||||
expect(
|
||||
parseTauriOidcCallback('moe.sable.app://evil/login?code=c1&state=s1')
|
||||
).toBeUndefined();
|
||||
expect(parseTauriOidcCallback('moe.sable.app://evil/login?code=c1&state=s1')).toBeUndefined();
|
||||
});
|
||||
});
|
||||
@@ -79,8 +79,7 @@ export const parseTauriOidcCallback = (
|
||||
// `moe.sable.app:/login?...` → hostname === '', pathname === '/login'
|
||||
// `moe.sable.app://login?...` → hostname === 'login', pathname === '/' or ''
|
||||
const hasLoginPath =
|
||||
callbackUrl.pathname === TAURI_OIDC_PATH ||
|
||||
callbackUrl.pathname === `${TAURI_OIDC_PATH}/`;
|
||||
callbackUrl.pathname === TAURI_OIDC_PATH || callbackUrl.pathname === `${TAURI_OIDC_PATH}/`;
|
||||
|
||||
const isSingleSlashFormat = callbackUrl.hostname === '' && hasLoginPath;
|
||||
|
||||
|
||||
Reference in new issue
Block a user