OIDC: Fix CodeQL warnings

This commit is contained in:
Denis Arnst 2026-02-05 20:31:07 +01:00
parent c2a7615319
commit e428ba5657
No known key found for this signature in database
GPG key ID: D5866C58940197BF
3 changed files with 21 additions and 3 deletions

View file

@ -134,6 +134,24 @@ describe('OidcSettingsSchema - validateSettings', function () {
expect(result.errors[0]).to.include('Invalid URI')
})
it('should not hang on pathological URI input', function () {
this.timeout(1000)
const result = validateSettings({
...validSettings,
authOpenIDMobileRedirectURIs: ['a://-/' + '/'.repeat(100) + '!']
})
expect(result.valid).to.be.false
expect(result.errors[0]).to.include('Invalid URI')
})
it('should accept URI with path segments', function () {
const result = validateSettings({
...validSettings,
authOpenIDMobileRedirectURIs: ['https://example.com/path/to/callback']
})
expect(result.valid).to.be.true
})
it('should reject unknown keys', function () {
const result = validateSettings({
...validSettings,