aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/juick/service/security/HTTPSignatureAuthenticationFilter.java4
1 files changed, 2 insertions, 2 deletions
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()));