Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
* <tt>AclEntryVoter</tt>:
* <ul>
* <li>Process domain object class <code>BankAccount</code>, configuration attribute
* <code>VOTE_ACL_BANK_ACCONT_READ</code>, require permission
* <code>VOTE_ACL_BANK_ACCOUNT_READ</code>, require permission
* <code>BasePermission.READ</code></li>
* <li>Process domain object class <code>BankAccount</code>, configuration attribute
* <code>VOTE_ACL_BANK_ACCOUNT_WRITE</code>, require permission list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <code>LookupStrategy</code>. 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 <code>LookupStrategy</code>. This class does not support
* subclassing, as it is likely to change in future releases and therefore subclassing is
* unsupported.
* <p>
* There are two SQL queries executed, one in the <tt>lookupPrimaryKeys</tt> method and
* one in <tt>lookupObjectIdentities</tt>. These are built from the same select and "order
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
* <p>
* 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
* <b>after</b> the <tt>FilterSecurityInteceptor</tt> in the chain, in order to apply the
* <b>after</b> the <tt>FilterSecurityInterceptor</tt> in the chain, in order to apply the
* correct constraints to the <tt>switchUserUrl</tt>. Example:
*
* <pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <code>expectdBaseType</code> is <code>null</code>, no check
* will be performed.
* of the type itself). If <code>expectedBaseType</code> is <code>null</code>, no
* check will be performed.
* <p>
* Can be used for verification purposes in implementations of
* {@link ThrowableCauseExtractor extractors}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down