Backport of gh-9387

Comment From: CaesarGao

Looking at the commit history, it doesn't appear that the HttpSessionSecurityContextSessionRepository.java changes have been made to the 5.3.X line. The file still shows it was last modified 2 years ago. Can see the change reflected in the 5.2.X and 5.4.X line. Could you review and confirm.

Comment From: rwinch

I wonder if the reason you cannot find the commit it is due to the fact this was incorrectly marked for 5.3.7 instead of 5.3.8? The commit is 38e9e8ca52ddc4bdd272083563a657d5e37ea1e8 Due to a problem with the release of 5.3.7 we used a release branch and the commit that made the change for the tag is https://github.com/spring-projects/spring-security/commit/9a49a8695fd7fd6ab5e8d31ba1fae00dead1f643

Comment From: CaesarGao

Thanks, the branch 5.3.x looks okay with the commit https://github.com/spring-projects/spring-security/commit/38e9e8ca52ddc4bdd272083563a657d5e37ea1e8. But the commit https://github.com/spring-projects/spring-security/commit/9a49a8695fd7fd6ab5e8d31ba1fae00dead1f643 for tag 5.3.8.RELEASE seems only made changes for HttpSessionSecurityContextSessionRepositoryTest.java, HttpSessinoSecurityContextSessionRepository.java still remain the same.