Skip to content

Commit

Permalink
[UNDERTOW-2213] Revert "[UNDERTOW-2188] fix deny-uncovered methods to…
Browse files Browse the repository at this point in the history
… work properly in corner case"

This reverts commit c64a8ae.
  • Loading branch information
fl4via committed Dec 15, 2022
1 parent 96b7d3a commit 4e793af
Showing 1 changed file with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,19 +184,6 @@ private void handleMatch(final String method, final PathSecurityInformation exac
transport(currentMatch, role.transportGuaranteeType);
currentMatch.constraints.add(new SingleConstraintMatch(role.emptyRoleSemantic, role.roles));
}
} else if(denyUncoveredHttpMethods) {
if(exact.perMethodRequiredRoles.size() == 0) {
// 13.8.4. When HTTP methods are not enumerated within a security-constraint, the protections defined by the
// constraint apply to the complete set of HTTP (extension) methods.
currentMatch.uncovered = false;
currentMatch.constraints.add(new SingleConstraintMatch(SecurityInfo.EmptyRoleSemantic.PERMIT, new HashSet<>()));
} else if(exact.perMethodRequiredRoles.size() > 0) {
//at this point method is null, but there is match, above if will be triggered for default path, we need to flip it?
currentMatch.uncovered = true;
//NOTE: ?
currentMatch.constraints.clear();
currentMatch.constraints.add(new SingleConstraintMatch(SecurityInfo.EmptyRoleSemantic.DENY, new HashSet<>()));
}
}
for (ExcludedMethodRoles excluded : exact.excludedMethodRoles) {
if (!excluded.methods.contains(method)) {
Expand Down

0 comments on commit 4e793af

Please sign in to comment.