Make SessionManagementConfigTests deterministic
Fixes: gh-4871
This commit is contained in:
parent
5cf2883afc
commit
e377dcf81b
|
@ -394,7 +394,6 @@ class SessionManagementConfigTests extends AbstractHttpConfigTests {
|
||||||
def 'session-fixation-protection=migrateSession'() {
|
def 'session-fixation-protection=migrateSession'() {
|
||||||
setup:
|
setup:
|
||||||
MockHttpServletRequest request = new MockHttpServletRequest(method:'POST')
|
MockHttpServletRequest request = new MockHttpServletRequest(method:'POST')
|
||||||
request.session.id = '123'
|
|
||||||
request.setParameter('username', 'user')
|
request.setParameter('username', 'user')
|
||||||
request.setParameter('password', 'password')
|
request.setParameter('password', 'password')
|
||||||
request.servletPath = '/login'
|
request.servletPath = '/login'
|
||||||
|
@ -406,13 +405,13 @@ class SessionManagementConfigTests extends AbstractHttpConfigTests {
|
||||||
csrf(disabled:true)
|
csrf(disabled:true)
|
||||||
}
|
}
|
||||||
createAppContext()
|
createAppContext()
|
||||||
request.session.id = '123'
|
String originalId = request.session.id
|
||||||
|
|
||||||
when:
|
when:
|
||||||
springSecurityFilterChain.doFilter(request,response, chain)
|
springSecurityFilterChain.doFilter(request,response, chain)
|
||||||
|
|
||||||
then:
|
then:
|
||||||
request.session.id != '123'
|
request.session.id != originalId
|
||||||
}
|
}
|
||||||
|
|
||||||
def disablingSessionProtectionRetainsSessionManagementFilterInvalidSessionUrlSet() {
|
def disablingSessionProtectionRetainsSessionManagementFilterInvalidSessionUrlSet() {
|
||||||
|
|
Loading…
Reference in New Issue