Преглед на файлове

Fix NullAway error

Related https://github.com/spring-projects/spring-framework/pull/35629
Joe Grandja преди 1 седмица
родител
ревизия
67c3ceb611

+ 1 - 1
web/src/main/java/org/springframework/security/web/FormPostRedirectStrategy.java

@@ -101,7 +101,7 @@ public final class FormPostRedirectStrategy implements RedirectStrategy {
 		// @formatter:off
 		final String html = REDIRECT_PAGE_TEMPLATE
 			// Clear the query string as we don't want that to be part of the form action URL
-			.replace("{{action}}", HtmlUtils.htmlEscape(uriComponentsBuilder.query(null).build().toUriString()))
+			.replace("{{action}}", HtmlUtils.htmlEscape(uriComponentsBuilder.replaceQuery(null).build().toUriString()))
 			.replace("{{params}}", hiddenInputsHtmlBuilder.toString())
 			.replace("{{nonce}}", HtmlUtils.htmlEscape(nonce));
 		// @formatter:on

+ 1 - 1
web/src/main/java/org/springframework/security/web/server/FormPostServerRedirectStrategy.java

@@ -105,7 +105,7 @@ public final class FormPostServerRedirectStrategy implements ServerRedirectStrat
 		// @formatter:off
 		final String html = REDIRECT_PAGE_TEMPLATE
 			// Clear the query string as we don't want that to be part of the form action URL
-			.replace("{{action}}", HtmlUtils.htmlEscape(uriComponentsBuilder.query(null).build().toUriString()))
+			.replace("{{action}}", HtmlUtils.htmlEscape(uriComponentsBuilder.replaceQuery(null).build().toUriString()))
 			.replace("{{params}}", hiddenInputsHtmlBuilder.toString())
 			.replace("{{nonce}}", HtmlUtils.htmlEscape(nonce));
 		// @formatter:on