Skip to content

Commit 67c3ceb

Browse files
committed
Fix NullAway error
Related spring-projects/spring-framework#35629
1 parent 95644fb commit 67c3ceb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

web/src/main/java/org/springframework/security/web/FormPostRedirectStrategy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public void sendRedirect(final HttpServletRequest request, final HttpServletResp
101101
// @formatter:off
102102
final String html = REDIRECT_PAGE_TEMPLATE
103103
// Clear the query string as we don't want that to be part of the form action URL
104-
.replace("{{action}}", HtmlUtils.htmlEscape(uriComponentsBuilder.query(null).build().toUriString()))
104+
.replace("{{action}}", HtmlUtils.htmlEscape(uriComponentsBuilder.replaceQuery(null).build().toUriString()))
105105
.replace("{{params}}", hiddenInputsHtmlBuilder.toString())
106106
.replace("{{nonce}}", HtmlUtils.htmlEscape(nonce));
107107
// @formatter:on

web/src/main/java/org/springframework/security/web/server/FormPostServerRedirectStrategy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public Mono<Void> sendRedirect(ServerWebExchange exchange, URI location) {
105105
// @formatter:off
106106
final String html = REDIRECT_PAGE_TEMPLATE
107107
// Clear the query string as we don't want that to be part of the form action URL
108-
.replace("{{action}}", HtmlUtils.htmlEscape(uriComponentsBuilder.query(null).build().toUriString()))
108+
.replace("{{action}}", HtmlUtils.htmlEscape(uriComponentsBuilder.replaceQuery(null).build().toUriString()))
109109
.replace("{{params}}", hiddenInputsHtmlBuilder.toString())
110110
.replace("{{nonce}}", HtmlUtils.htmlEscape(nonce));
111111
// @formatter:on

0 commit comments

Comments
 (0)