修复 设备注册时报错 #799

This commit is contained in:
648540858 2023-03-31 09:10:16 +08:00
parent 6b40dd1320
commit e1eb5274f7

View File

@ -171,7 +171,7 @@ public class DigestServerAuthenticationHelper {
*/
public boolean doAuthenticatePlainTextPassword(Request request, String pass) {
AuthorizationHeader authHeader = (AuthorizationHeader) request.getHeader(AuthorizationHeader.NAME);
if ( authHeader == null ) {
if ( authHeader == null || authHeader.getRealm() == null) {
return false;
}
String realm = authHeader.getRealm().trim();