mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 21:15:32 +09:00
fix: SSO Issuer URL formatted incorrectly (#1096)
Co-authored-by: Jiralite <[email protected]>
This commit is contained in:
1 parent
34ef4df925
commit
4a518b8e68
2 files changed
+9
-8
No files matched your search
@@ -644,7 +644,7 @@ export class SsoService {
|
||||
}
|
||||
|
||||
private async getOrCreateJwks(jwksUrl: string): Promise<RemoteJwkSetResolver> {
|
||||
await this.validatePublicOutboundUrl(jwksUrl, 'jwks_url');
|
||||
await this.assertPublicOutboundUrl(jwksUrl, 'jwks_url');
|
||||
const now = Date.now();
|
||||
const cached = this.jwksCache.get(jwksUrl);
|
||||
if (cached && now - cached.cachedAt < SsoService.JWKS_CACHE_TTL_MS) {
|
||||
@@ -893,7 +893,7 @@ export class SsoService {
|
||||
};
|
||||
}
|
||||
|
||||
private async validatePublicOutboundUrl(rawUrl: string, fieldName: string): Promise<URL> {
|
||||
private async assertPublicOutboundUrl(rawUrl: string, fieldName: string): Promise<string> {
|
||||
return validateSsoPublicOutboundUrl(rawUrl, fieldName);
|
||||
}
|
||||
|
||||
@@ -902,8 +902,7 @@ export class SsoService {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
const validUrl = await this.validatePublicOutboundUrl(rawUrl, fieldName);
|
||||
return validUrl.toString();
|
||||
return await this.assertPublicOutboundUrl(rawUrl, fieldName);
|
||||
} catch (error) {
|
||||
this.logger.warn({fieldName, rawUrl, error}, 'Ignoring SSO URL that failed outbound policy validation');
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user