Skip to content

Commit bcc2f5f

Browse files
committed
Catch any URI related exception in ClientRegistration
1 parent 2b57fe2 commit bcc2f5f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

oauth2-client/src/main/java/org/springframework/security/oauth2/client/registration/ClientRegistration.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import org.springframework.util.CollectionUtils;
2222

2323
import java.net.URI;
24-
import java.net.URISyntaxException;
2524
import java.util.Arrays;
2625
import java.util.Collections;
2726
import java.util.LinkedHashSet;
@@ -218,9 +217,9 @@ private void validateClientWithAuthorizationCodeGrantType() {
218217
private URI toURI(String uriStr) {
219218
try {
220219
return new URI(uriStr);
221-
} catch (URISyntaxException ex) {
220+
} catch (Exception ex) {
222221
throw new IllegalArgumentException("An error occurred parsing URI: " + uriStr, ex);
223222
}
224223
}
225224
}
226-
}
225+
}

0 commit comments

Comments
 (0)