diff --git a/access/src/main/java/org/springframework/security/acls/AclEntryVoter.java b/access/src/main/java/org/springframework/security/acls/AclEntryVoter.java index e25b97bc0f..845024154c 100644 --- a/access/src/main/java/org/springframework/security/acls/AclEntryVoter.java +++ b/access/src/main/java/org/springframework/security/acls/AclEntryVoter.java @@ -71,7 +71,7 @@ * AclEntryVoter: *
BankAccount, configuration attribute
- * VOTE_ACL_BANK_ACCONT_READ, require permission
+ * VOTE_ACL_BANK_ACCOUNT_READ, require permission
* BasePermission.READBankAccount, configuration attribute
* VOTE_ACL_BANK_ACCOUNT_WRITE, require permission list
diff --git a/acl/src/main/java/org/springframework/security/acls/jdbc/BasicLookupStrategy.java b/acl/src/main/java/org/springframework/security/acls/jdbc/BasicLookupStrategy.java
index 18f93d0fd8..6f5499d19b 100644
--- a/acl/src/main/java/org/springframework/security/acls/jdbc/BasicLookupStrategy.java
+++ b/acl/src/main/java/org/springframework/security/acls/jdbc/BasicLookupStrategy.java
@@ -65,10 +65,11 @@
* NB: This implementation does attempt to provide reasonably optimised lookups - within
* the constraints of a normalised database and standard ANSI SQL features. If you are
* willing to sacrifice either of these constraints (e.g. use a particular database
- * feature such as hierarchical queries or materalized views, or reduce normalisation) you
- * are likely to achieve better performance. In such situations you will need to provide
- * your own custom LookupStrategy. This class does not support subclassing,
- * as it is likely to change in future releases and therefore subclassing is unsupported.
+ * feature such as hierarchical queries or materialized views, or reduce normalisation)
+ * you are likely to achieve better performance. In such situations you will need to
+ * provide your own custom LookupStrategy. This class does not support
+ * subclassing, as it is likely to change in future releases and therefore subclassing is
+ * unsupported.
* * There are two SQL queries executed, one in the lookupPrimaryKeys method and * one in lookupObjectIdentities. These are built from the same select and "order diff --git a/web/src/main/java/org/springframework/security/web/authentication/switchuser/SwitchUserFilter.java b/web/src/main/java/org/springframework/security/web/authentication/switchuser/SwitchUserFilter.java index 2dc50d3fe2..5f262928dc 100644 --- a/web/src/main/java/org/springframework/security/web/authentication/switchuser/SwitchUserFilter.java +++ b/web/src/main/java/org/springframework/security/web/authentication/switchuser/SwitchUserFilter.java @@ -99,7 +99,7 @@ *
* To configure the Switch User Processing Filter, create a bean definition for the Switch * User processing filter and add to the filterChainProxy. Note that the filter must come - * after the FilterSecurityInteceptor in the chain, in order to apply the + * after the FilterSecurityInterceptor in the chain, in order to apply the * correct constraints to the switchUserUrl. Example: * *
diff --git a/web/src/main/java/org/springframework/security/web/server/csrf/WebSessionServerCsrfTokenRepository.java b/web/src/main/java/org/springframework/security/web/server/csrf/WebSessionServerCsrfTokenRepository.java
index 5466267035..fa4f851e69 100644
--- a/web/src/main/java/org/springframework/security/web/server/csrf/WebSessionServerCsrfTokenRepository.java
+++ b/web/src/main/java/org/springframework/security/web/server/csrf/WebSessionServerCsrfTokenRepository.java
@@ -102,7 +102,7 @@ public void setHeaderName(String headerName) {
* @param sessionAttributeName the new attribute name to use
*/
public void setSessionAttributeName(String sessionAttributeName) {
- Assert.hasLength(sessionAttributeName, "sessionAttributename cannot be null or empty");
+ Assert.hasLength(sessionAttributeName, "sessionAttributeName cannot be null or empty");
this.sessionAttributeName = sessionAttributeName;
}
diff --git a/web/src/main/java/org/springframework/security/web/server/header/CacheControlServerHttpHeadersWriter.java b/web/src/main/java/org/springframework/security/web/server/header/CacheControlServerHttpHeadersWriter.java
index 2e1660226e..c4fad5afcf 100644
--- a/web/src/main/java/org/springframework/security/web/server/header/CacheControlServerHttpHeadersWriter.java
+++ b/web/src/main/java/org/springframework/security/web/server/header/CacheControlServerHttpHeadersWriter.java
@@ -49,13 +49,20 @@ public class CacheControlServerHttpHeadersWriter implements ServerHttpHeadersWri
/**
* The value for cache control value
*/
- public static final String CACHE_CONTRTOL_VALUE = "no-cache, no-store, max-age=0, must-revalidate";
+ public static final String CACHE_CONTROL_VALUE = "no-cache, no-store, max-age=0, must-revalidate";
+
+ /**
+ * The value for the cache control value.
+ * @deprecated Please use {@link #CACHE_CONTROL_VALUE}
+ */
+ @Deprecated(forRemoval = true, since = "7.0")
+ public static final String CACHE_CONTRTOL_VALUE = CACHE_CONTROL_VALUE;
/**
* The delegate to write all the cache control related headers
*/
private static final ServerHttpHeadersWriter CACHE_HEADERS = StaticServerHttpHeadersWriter.builder()
- .header(HttpHeaders.CACHE_CONTROL, CacheControlServerHttpHeadersWriter.CACHE_CONTRTOL_VALUE)
+ .header(HttpHeaders.CACHE_CONTROL, CacheControlServerHttpHeadersWriter.CACHE_CONTROL_VALUE)
.header(HttpHeaders.PRAGMA, CacheControlServerHttpHeadersWriter.PRAGMA_VALUE)
.header(HttpHeaders.EXPIRES, CacheControlServerHttpHeadersWriter.EXPIRES_VALUE)
.build();
diff --git a/web/src/main/java/org/springframework/security/web/util/ThrowableAnalyzer.java b/web/src/main/java/org/springframework/security/web/util/ThrowableAnalyzer.java
index 48a5a79fdb..72d788924e 100755
--- a/web/src/main/java/org/springframework/security/web/util/ThrowableAnalyzer.java
+++ b/web/src/main/java/org/springframework/security/web/util/ThrowableAnalyzer.java
@@ -204,8 +204,8 @@ public final Throwable[] determineCauseChain(Throwable throwable) {
/**
* Verifies that the provided throwable is a valid subclass of the provided type (or
- * of the type itself). If expectdBaseType is null, no check
- * will be performed.
+ * of the type itself). If expectedBaseType is null, no
+ * check will be performed.
*
* Can be used for verification purposes in implementations of
* {@link ThrowableCauseExtractor extractors}.
diff --git a/web/src/test/java/org/springframework/security/web/server/header/CacheControlServerHttpHeadersWriterTests.java b/web/src/test/java/org/springframework/security/web/server/header/CacheControlServerHttpHeadersWriterTests.java
index 9b00186077..e30e484abe 100644
--- a/web/src/test/java/org/springframework/security/web/server/header/CacheControlServerHttpHeadersWriterTests.java
+++ b/web/src/test/java/org/springframework/security/web/server/header/CacheControlServerHttpHeadersWriterTests.java
@@ -44,7 +44,7 @@ public void writeHeadersWhenCacheHeadersThenWritesAllCacheControl() {
this.writer.writeHttpHeaders(this.exchange);
assertThat(this.headers.headerNames()).hasSize(3);
assertThat(this.headers.get(HttpHeaders.CACHE_CONTROL))
- .containsOnly(CacheControlServerHttpHeadersWriter.CACHE_CONTRTOL_VALUE);
+ .containsOnly(CacheControlServerHttpHeadersWriter.CACHE_CONTROL_VALUE);
assertThat(this.headers.get(HttpHeaders.EXPIRES))
.containsOnly(CacheControlServerHttpHeadersWriter.EXPIRES_VALUE);
assertThat(this.headers.get(HttpHeaders.PRAGMA)).containsOnly(CacheControlServerHttpHeadersWriter.PRAGMA_VALUE);
diff --git a/web/src/test/java/org/springframework/security/web/server/header/StaticServerHttpHeadersWriterTests.java b/web/src/test/java/org/springframework/security/web/server/header/StaticServerHttpHeadersWriterTests.java
index c9c4a97811..34de507d5e 100644
--- a/web/src/test/java/org/springframework/security/web/server/header/StaticServerHttpHeadersWriterTests.java
+++ b/web/src/test/java/org/springframework/security/web/server/header/StaticServerHttpHeadersWriterTests.java
@@ -69,7 +69,7 @@ public void writeHeadersWhenHeaderWrittenWithDifferentCaseThenDoesNotWriteHeader
// due to the fact that gh-10557 reports NettyHeadersAdapter as the
// response headers implementation, which is not accessible here.
HttpHeaders caseSensitiveHeaders = new HttpHeaders(new LinkedMultiValueMap<>());
- caseSensitiveHeaders.set(HttpHeaders.CACHE_CONTROL, CacheControlServerHttpHeadersWriter.CACHE_CONTRTOL_VALUE);
+ caseSensitiveHeaders.set(HttpHeaders.CACHE_CONTROL, CacheControlServerHttpHeadersWriter.CACHE_CONTROL_VALUE);
caseSensitiveHeaders.set(HttpHeaders.PRAGMA, CacheControlServerHttpHeadersWriter.PRAGMA_VALUE);
caseSensitiveHeaders.set(HttpHeaders.EXPIRES, CacheControlServerHttpHeadersWriter.EXPIRES_VALUE);
this.writer = new StaticServerHttpHeadersWriter(caseSensitiveHeaders);
@@ -80,13 +80,13 @@ public void writeHeadersWhenHeaderWrittenWithDifferentCaseThenDoesNotWriteHeader
@Test
public void writeHeadersWhenMultiHeaderThenWritesAllHeaders() {
this.writer = StaticServerHttpHeadersWriter.builder()
- .header(HttpHeaders.CACHE_CONTROL, CacheControlServerHttpHeadersWriter.CACHE_CONTRTOL_VALUE)
+ .header(HttpHeaders.CACHE_CONTROL, CacheControlServerHttpHeadersWriter.CACHE_CONTROL_VALUE)
.header(HttpHeaders.PRAGMA, CacheControlServerHttpHeadersWriter.PRAGMA_VALUE)
.header(HttpHeaders.EXPIRES, CacheControlServerHttpHeadersWriter.EXPIRES_VALUE)
.build();
this.writer.writeHttpHeaders(this.exchange);
assertThat(this.headers.get(HttpHeaders.CACHE_CONTROL))
- .containsOnly(CacheControlServerHttpHeadersWriter.CACHE_CONTRTOL_VALUE);
+ .containsOnly(CacheControlServerHttpHeadersWriter.CACHE_CONTROL_VALUE);
assertThat(this.headers.get(HttpHeaders.PRAGMA)).containsOnly(CacheControlServerHttpHeadersWriter.PRAGMA_VALUE);
assertThat(this.headers.get(HttpHeaders.EXPIRES))
.containsOnly(CacheControlServerHttpHeadersWriter.EXPIRES_VALUE);
@@ -97,7 +97,7 @@ public void writeHeadersWhenMultiHeaderAndSingleWrittenThenNoHeadersOverridden()
String headerValue = "other";
this.headers.set(HttpHeaders.CACHE_CONTROL, headerValue);
this.writer = StaticServerHttpHeadersWriter.builder()
- .header(HttpHeaders.CACHE_CONTROL, CacheControlServerHttpHeadersWriter.CACHE_CONTRTOL_VALUE)
+ .header(HttpHeaders.CACHE_CONTROL, CacheControlServerHttpHeadersWriter.CACHE_CONTROL_VALUE)
.header(HttpHeaders.PRAGMA, CacheControlServerHttpHeadersWriter.PRAGMA_VALUE)
.header(HttpHeaders.EXPIRES, CacheControlServerHttpHeadersWriter.EXPIRES_VALUE)
.build();
diff --git a/web/src/test/java/org/springframework/security/web/server/header/XXssProtectionServerHttpHeadersWriterTests.java b/web/src/test/java/org/springframework/security/web/server/header/XXssProtectionServerHttpHeadersWriterTests.java
index 5e24a13911..b242e695e0 100644
--- a/web/src/test/java/org/springframework/security/web/server/header/XXssProtectionServerHttpHeadersWriterTests.java
+++ b/web/src/test/java/org/springframework/security/web/server/header/XXssProtectionServerHttpHeadersWriterTests.java
@@ -52,7 +52,7 @@ public void writeHeadersWhenNoHeadersThenWriteHeaders() {
}
@Test
- public void writeHeadersWhenHeaderWrittenThenDoesNotOverrride() {
+ public void writeHeadersWhenHeaderWrittenThenDoesNotOverride() {
String headerValue = "value";
this.headers.set(XXssProtectionServerHttpHeadersWriter.X_XSS_PROTECTION, headerValue);
this.writer.writeHttpHeaders(this.exchange);