Nexory opened a new pull request, #2927: URL: https://github.com/apache/shiro/pull/2927
Fixes #2926 The `@Value` expression for `shiro.rememberMeManager.cookie.path` in `AbstractShiroWebConfiguration` had one closing brace too many, so Spring appended the literal text `" }"` to the rememberMe cookie path: `"/ }"` by default and `"/app }"` with the property set to `"/app"`. This removes the extra brace and adds tests for both cases. The expression for the session cookie path has no extra brace; after this change the two expressions are written the same way. The new tests, `ShiroWebConfigurationRememberMeCookiePathDefaultTest` and `ShiroWebConfigurationRememberMeCookiePathCustomTest`, sit next to `ShiroWebConfigurationSameSiteStrictTest` and use the same `SpringJUnitConfig` classes. They check that `rememberMeCookiePath` and `rememberMeCookieTemplate().getPath()` are `"/"` without the property and `"/app"` with `shiro.rememberMeManager.cookie.path=/app`. The same line is in the 2.x branch (line 87). I can send a separate pull request for 2.x if you want one. What I measured on current main (039425bb): * Without the change both new tests fail, with `expected: "/" but was: "/ }"` and `expected: "/app" but was: "/app }"`; with it both pass. * When I break the property key in the expression on purpose, the test with the property set fails again (`expected: "/app" but was: "/"`) and the default test stays green. * `./mvnw verify` for support/spring with the modules it builds from (Temurin 25.0.4.1 and Maven 3.10.0 from the wrapper) ran 795 tests with 0 failed, against 793 tests with 0 failed on main without the change. The difference is the two new tests. * A full `./mvnw verify` with the change passed every module up to the Jakarta EE integration tests. Those start Firefox through Selenium, which my container does not have, so they could not run there. * `./mvnw apache-rat:check` reports no issues. * I did not run `-Pdocs` or the other JDK and OS combinations of the CI matrix. - [x] GitHub issue filed: #2926 - [x] Pull request title formatted as [#2926] - ... - [x] fixes #2926 added - [x] mvn verify run, as far as described above - [x] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
