fix: 不设置csrfToken提示错误

This commit is contained in:
Captain.B 2021-03-10 17:48:38 +08:00
parent cc16006b37
commit e11e59a256
1 changed files with 3 additions and 0 deletions

View File

@ -59,6 +59,9 @@ public class CsrfFilter extends AnonymousFilter {
}
private void validateToken(String csrfToken) {
if (StringUtils.isBlank(csrfToken)) {
throw new RuntimeException("csrf token is empty");
}
csrfToken = CodingUtil.aesDecrypt(csrfToken, SessionUser.secret, SessionUser.iv);
String[] signatureArray = StringUtils.split(StringUtils.trimToNull(csrfToken), "|");