一、该问题的重现步骤是什么?
1.
error_description contains invalid ASCII characters, it must conform to RFC 6749
2.
只要是抛出异常 , 用中文提示: 如
throw new UsernameNotFoundException(TokenUtil.USER_NOT_FOUND);
// TokenUtil.USER_NOT_FOUND = "用户名或密码错误"
就会走到 OAuth2Exception里边 ,
然后
private static String assertErrorDescription(String description) {
if () {
throw new IllegalArgumentException("error_description contains invalid ASCII characters, it must conform to RFC 6749");
}
return description;
}
private static boolean (String description) {
if (description == null) {
return true;
}
for (char c : description.toCharArray()) {
if (withinTheRangeOf(c, 0x20, 0x21) ||
withinTheRangeOf(c, 0x23, 0x5B) ||
withinTheRangeOf(c, 0x5D, 0x7E)) {
return true;
}
}
return false;
}
, 中文都不在那个范围里边, 接着抛出其他异常 , 前端就收不到 "用户名或密码错误" 了.3.
二、你期待的结果是什么?实际看到的又是什么?
三、你正在使用的是什么产品,什么版本?在什么操作系统上?
四、请提供详细的错误堆栈信息,这很重要。
五、若有更多详细信息,请在下面提供。
扫一扫访问 Blade技术社区 移动端