Skip to content

Commit 7eba3c1

Browse files
artsploitjricher
authored andcommitted
Fix Spring Autobinding vulnerability
1. Make authorizationRequest no longer affected by http request parameters due to @ModelAttribute. See http://agrrrdog.blogspot.com/2017/03/autobinding-vulns-and-spring-mvc.html
1 parent 0d4ef2c commit 7eba3c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

openid-connect-server/src/main/java/org/mitre/oauth2/web/OAuthConfirmationController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ public OAuthConfirmationController(ClientDetailsEntityService clientService) {
103103

104104
@PreAuthorize("hasRole('ROLE_USER')")
105105
@RequestMapping("/oauth/confirm_access")
106-
public String confimAccess(Map<String, Object> model, @ModelAttribute("authorizationRequest") AuthorizationRequest authRequest,
107-
Principal p) {
106+
public String confirmAccess(Map<String, Object> model, Principal p) {
108107

108+
AuthorizationRequest authRequest = (AuthorizationRequest) model.get("authorizationRequest");
109109
// Check the "prompt" parameter to see if we need to do special processing
110110

111111
String prompt = (String)authRequest.getExtensions().get(PROMPT);

0 commit comments

Comments
 (0)