Skip to content

Commit ee97c83

Browse files
meliezerjzheaux
authored andcommitted
Update request-matcher schema and XML tests to use path
Closes gh-18641 Signed-off-by: Menashe Eliezer <menashe.eliezer@gmail.com>
1 parent ba12f5e commit ee97c83

8 files changed

Lines changed: 24 additions & 28 deletions

config/src/main/resources/org/springframework/security/config/spring-security-7.0.rnc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ base64 =
1212
## Whether a string should be base64 encoded
1313
attribute base64 {xsd:boolean}
1414
request-matcher =
15-
## Defines the strategy use for matching incoming requests. Currently the options are 'mvc' (for Spring MVC matcher), 'ant' (for ant path patterns), 'regex' for regular expressions and 'ciRegex' for case-insensitive regular expressions.
16-
attribute request-matcher {"mvc" | "ant" | "regex" | "ciRegex"}
15+
## Defines the strategy use for matching incoming requests. Currently the options are 'path' (for PathPatternRequestMatcher), 'regex' for regular expressions and 'ciRegex' for case-insensitive regular expressions.
16+
attribute request-matcher {"path" | "regex" | "ciRegex"}
1717
port =
1818
## Specifies an IP port number. Used to configure an embedded LDAP server, for example.
1919
attribute port { xsd:nonNegativeInteger }

config/src/main/resources/org/springframework/security/config/spring-security-7.0.xsd

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,14 @@
2727
<xs:attributeGroup name="request-matcher">
2828
<xs:attribute name="request-matcher" use="required">
2929
<xs:annotation>
30-
<xs:documentation>Defines the strategy use for matching incoming requests. Currently the options are 'mvc'
31-
(for Spring MVC matcher), 'ant' (for ant path patterns), 'regex' for regular expressions
32-
and 'ciRegex' for case-insensitive regular expressions.
30+
<xs:documentation>Defines the strategy use for matching incoming requests. Currently the options are 'path'
31+
(for PathPatternRequestMatcher), 'regex' for regular expressions and 'ciRegex' for
32+
case-insensitive regular expressions.
3333
</xs:documentation>
3434
</xs:annotation>
3535
<xs:simpleType>
3636
<xs:restriction base="xs:token">
37-
<xs:enumeration value="mvc"/>
38-
<xs:enumeration value="ant"/>
37+
<xs:enumeration value="path"/>
3938
<xs:enumeration value="regex"/>
4039
<xs:enumeration value="ciRegex"/>
4140
</xs:restriction>
@@ -1306,15 +1305,14 @@
13061305
</xs:attribute>
13071306
<xs:attribute name="request-matcher">
13081307
<xs:annotation>
1309-
<xs:documentation>Defines the strategy use for matching incoming requests. Currently the options are 'mvc'
1310-
(for Spring MVC matcher), 'ant' (for ant path patterns), 'regex' for regular expressions
1311-
and 'ciRegex' for case-insensitive regular expressions.
1308+
<xs:documentation>Defines the strategy use for matching incoming requests. Currently the options are 'path'
1309+
(for PathPatternRequestMatcher), 'regex' for regular expressions and 'ciRegex' for
1310+
case-insensitive regular expressions.
13121311
</xs:documentation>
13131312
</xs:annotation>
13141313
<xs:simpleType>
13151314
<xs:restriction base="xs:token">
1316-
<xs:enumeration value="mvc"/>
1317-
<xs:enumeration value="ant"/>
1315+
<xs:enumeration value="path"/>
13181316
<xs:enumeration value="regex"/>
13191317
<xs:enumeration value="ciRegex"/>
13201318
</xs:restriction>
@@ -2474,15 +2472,14 @@
24742472
<xs:attributeGroup name="filter-chain-map.attlist">
24752473
<xs:attribute name="request-matcher">
24762474
<xs:annotation>
2477-
<xs:documentation>Defines the strategy use for matching incoming requests. Currently the options are 'mvc'
2478-
(for Spring MVC matcher), 'ant' (for ant path patterns), 'regex' for regular expressions
2479-
and 'ciRegex' for case-insensitive regular expressions.
2475+
<xs:documentation>Defines the strategy use for matching incoming requests. Currently the options are 'path'
2476+
(for PathPatternRequestMatcher), 'regex' for regular expressions and 'ciRegex' for
2477+
case-insensitive regular expressions.
24802478
</xs:documentation>
24812479
</xs:annotation>
24822480
<xs:simpleType>
24832481
<xs:restriction base="xs:token">
2484-
<xs:enumeration value="mvc"/>
2485-
<xs:enumeration value="ant"/>
2482+
<xs:enumeration value="path"/>
24862483
<xs:enumeration value="regex"/>
24872484
<xs:enumeration value="ciRegex"/>
24882485
</xs:restriction>
@@ -2580,15 +2577,14 @@
25802577
</xs:attribute>
25812578
<xs:attribute name="request-matcher">
25822579
<xs:annotation>
2583-
<xs:documentation>Defines the strategy use for matching incoming requests. Currently the options are 'mvc'
2584-
(for Spring MVC matcher), 'ant' (for ant path patterns), 'regex' for regular expressions
2585-
and 'ciRegex' for case-insensitive regular expressions.
2580+
<xs:documentation>Defines the strategy use for matching incoming requests. Currently the options are 'path'
2581+
(for PathPatternRequestMatcher), 'regex' for regular expressions and 'ciRegex' for
2582+
case-insensitive regular expressions.
25862583
</xs:documentation>
25872584
</xs:annotation>
25882585
<xs:simpleType>
25892586
<xs:restriction base="xs:token">
2590-
<xs:enumeration value="mvc"/>
2591-
<xs:enumeration value="ant"/>
2587+
<xs:enumeration value="path"/>
25922588
<xs:enumeration value="regex"/>
25932589
<xs:enumeration value="ciRegex"/>
25942590
</xs:restriction>

config/src/test/resources/org/springframework/security/config/http/InterceptUrlConfigTests-AntMatcherServletPath.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
http://www.springframework.org/schema/beans
2525
https://www.springframework.org/schema/beans/spring-beans.xsd">
2626

27-
<http request-matcher="ant" use-authorization-manager="false">
27+
<http request-matcher="path" use-authorization-manager="false">
2828
<intercept-url pattern="/path" access="denyAll" servlet-path="/spring"/>
2929
<http-basic/>
3030
</http>

config/src/test/resources/org/springframework/security/config/http/InterceptUrlConfigTests-AntMatcherServletPathAuthorizationManager.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
http://www.springframework.org/schema/beans
2525
https://www.springframework.org/schema/beans/spring-beans.xsd">
2626

27-
<http request-matcher="ant">
27+
<http request-matcher="path">
2828
<intercept-url pattern="/path" access="denyAll" servlet-path="/spring"/>
2929
<http-basic/>
3030
</http>

config/src/test/resources/org/springframework/security/config/http/InterceptUrlConfigTests-MvcMatchers.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
http://www.springframework.org/schema/mvc
2828
https://www.springframework.org/schema/mvc/spring-mvc.xsd">
2929

30-
<http auto-config="true" request-matcher="mvc" use-authorization-manager="false">
30+
<http auto-config="true" request-matcher="path" use-authorization-manager="false">
3131
<intercept-url pattern="/path" access="denyAll"/>
3232
<http-basic/>
3333
</http>

config/src/test/resources/org/springframework/security/config/http/InterceptUrlConfigTests-MvcMatchersAuthorizationManager.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
http://www.springframework.org/schema/mvc
2828
https://www.springframework.org/schema/mvc/spring-mvc.xsd">
2929

30-
<http auto-config="true" request-matcher="mvc">
30+
<http auto-config="true" request-matcher="path">
3131
<intercept-url pattern="/path" access="denyAll"/>
3232
<http-basic/>
3333
</http>

config/src/test/resources/org/springframework/security/config/http/InterceptUrlConfigTests-MvcMatchersServletPath.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
http://www.springframework.org/schema/mvc
2828
https://www.springframework.org/schema/mvc/spring-mvc.xsd">
2929

30-
<http auto-config="true" request-matcher="mvc" use-authorization-manager="false">
30+
<http auto-config="true" request-matcher="path" use-authorization-manager="false">
3131
<intercept-url pattern="/path" access="denyAll" servlet-path="/spring"/>
3232
<http-basic/>
3333
</http>

config/src/test/resources/org/springframework/security/config/http/InterceptUrlConfigTests-MvcMatchersServletPathAuthorizationManager.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
http://www.springframework.org/schema/mvc
2828
https://www.springframework.org/schema/mvc/spring-mvc.xsd">
2929

30-
<http auto-config="true" request-matcher="mvc">
30+
<http auto-config="true" request-matcher="path">
3131
<intercept-url pattern="/path" access="denyAll" servlet-path="/spring"/>
3232
<http-basic/>
3333
</http>

0 commit comments

Comments
 (0)