fix(12): IN-01 require https:// on appExternalUrl in configSchema
appExternalUrl is injected as OIDC_AUTH_EXTERNAL_URL (the redirect URI base); Authelia rejects non-https redirect URIs in production. Added .refine() guard matching the existing oidcIssuer pattern. Added test that verifies http:// appExternalUrl is rejected with 400. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
61a869ca7d
commit
22d1581484
@@ -63,7 +63,11 @@ const configSchema = z.object({
|
|||||||
.refine((v) => v.startsWith('https://'), { message: 'oidcIssuer must be an https URL' }),
|
.refine((v) => v.startsWith('https://'), { message: 'oidcIssuer must be an https URL' }),
|
||||||
oidcClientId: z.string().min(1).max(256),
|
oidcClientId: z.string().min(1).max(256),
|
||||||
vapidPublicKey: z.string().min(1).max(512),
|
vapidPublicKey: z.string().min(1).max(512),
|
||||||
appExternalUrl: z.string().url().max(512),
|
appExternalUrl: z
|
||||||
|
.string()
|
||||||
|
.url()
|
||||||
|
.max(512)
|
||||||
|
.refine((v) => v.startsWith('https://'), { message: 'appExternalUrl must be an https URL' }),
|
||||||
});
|
});
|
||||||
|
|
||||||
const credentialSchema = z.object({
|
const credentialSchema = z.object({
|
||||||
|
|||||||
Reference in New Issue
Block a user