Thanks to visit codestin.com
Credit goes to github.com

Skip to content

SecureClientUrisExecutor doesn't allow for "+" weborigin #45587

@ahus1

Description

@ahus1

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

oidc

Describe the bug

When adding a secure-client-uris policy check, this does not allow a Web Origins setting of + even though those URLs are secure.

Version

main

Regression

  • The issue is a regression

Expected behavior

A + should be accepted if the rootUrl and redirectUris are secure.

Actual behavior

A + leads to a validation error in the frontend:

Invalid webOrigins

How to Reproduce?

  • Create a client policy that contains secure-client-uris
  • Enter + in the WebOrigins

Anything else?

The problematic code is somewhere about here:

// web origins
List<String> webOrigins = clientRep.getWebOrigins();
if (webOrigins != null) confirmSecureUris(webOrigins, "webOrigins");

The WebOrigins are usually resolved as shown here:

if (origins.contains(INCLUDE_REDIRECTS)) {
origins.remove(INCLUDE_REDIRECTS);
for (String redirectUri : RedirectUtils.resolveValidRedirects(session, client.getRootUrl(), client.getRedirectUris())) {
if (redirectUri.startsWith("http://") || redirectUri.startsWith("https://")) {
origins.add(UriUtils.getOrigin(redirectUri));
}
}
}

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions