mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-03-03 20:09:18 +00:00
SEC-2511: Remove double ALLOW-FROM in X-Frame-Options header
This commit is contained in:
parent
6de138c2f2
commit
e15cee62f4
@ -73,7 +73,7 @@ public class AbstractRequestParameterAllowFromStrategyTests {
|
||||
|
||||
assertThat(
|
||||
strategy
|
||||
.getAllowFromValue(request)).isEqualTo("ALLOW-FROM "+value);
|
||||
.getAllowFromValue(request)).isEqualTo(value);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -33,11 +33,11 @@ public class RegExpAllowFromStrategyTests {
|
||||
|
||||
request.setParameter("from", "http://abc.test.com");
|
||||
String result1 = strategy.getAllowFromValue(request);
|
||||
assertThat(result1, is("ALLOW-FROM http://abc.test.com"));
|
||||
assertThat(result1, is("http://abc.test.com"));
|
||||
|
||||
request.setParameter("from", "http://foo.test.com");
|
||||
String result2 = strategy.getAllowFromValue(request);
|
||||
assertThat(result2, is("ALLOW-FROM http://foo.test.com"));
|
||||
assertThat(result2, is("http://foo.test.com"));
|
||||
|
||||
request.setParameter("from", "http://test.foobar.com");
|
||||
String result3 = strategy.getAllowFromValue(request);
|
||||
|
@ -38,7 +38,7 @@ public class WhiteListedAllowFromStrategyTests {
|
||||
request.setParameter("from", "http://www.test.com");
|
||||
|
||||
String result = strategy.getAllowFromValue(request);
|
||||
assertThat(result, is("ALLOW-FROM http://www.test.com"));
|
||||
assertThat(result, is("http://www.test.com"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -52,7 +52,7 @@ public class WhiteListedAllowFromStrategyTests {
|
||||
request.setParameter("from", "http://www.test.com");
|
||||
|
||||
String result = strategy.getAllowFromValue(request);
|
||||
assertThat(result, is("ALLOW-FROM http://www.test.com"));
|
||||
assertThat(result, is("http://www.test.com"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
x
Reference in New Issue
Block a user