From c693f54a6118784c05a44993de9eed5af050b55e Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 1 Mar 2019 16:40:49 +0300 Subject: Fix external auth --- .../com/juick/service/security/HTTPSignatureAuthenticationFilter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/juick/service/security/HTTPSignatureAuthenticationFilter.java b/src/main/java/com/juick/service/security/HTTPSignatureAuthenticationFilter.java index 22dc3b9c..44d97207 100644 --- a/src/main/java/com/juick/service/security/HTTPSignatureAuthenticationFilter.java +++ b/src/main/java/com/juick/service/security/HTTPSignatureAuthenticationFilter.java @@ -43,8 +43,8 @@ public class HTTPSignatureAuthenticationFilter extends OncePerRequestFilter { .collect(Collectors.toMap(String::toLowerCase, request::getHeader)); if (StringUtils.isNotEmpty(headers.get("signature"))) { User user = signatureManager.verifySignature(request.getMethod(), request.getRequestURI(), headers); - if (!user.isAnonymous()) { - String userUri = user.getUri().toString(); + String userUri = user.getUri().toString(); + if (!user.isAnonymous() || userUri.length() > 0) { if (userUri.length() == 0) { User userWithPassword = userService.getUserByName(user.getName()); userWithPassword.setAuthHash(userService.getHashByUID(userWithPassword.getUid())); -- cgit v1.2.3