fix(core): Remove SAML config metadataUrl if XML metadata is set directly (#6143)

remove metadataUrl if metadata is set directly
This commit is contained in:
Michael Auerswald 2023-05-02 11:22:34 +02:00 committed by GitHub
parent d9af69116a
commit 25fe14be56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -211,6 +211,8 @@ export class SamlService {
this._samlPreferences.metadata = fetchedMetadata;
}
} else if (prefs.metadata) {
// remove metadataUrl if metadata is set directly
this._samlPreferences.metadataUrl = undefined;
const validationResult = await validateMetadata(prefs.metadata);
if (!validationResult) {
throw new Error('Invalid SAML metadata');