aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-03-01 16:40:49 +0300
committerGravatar Vitaly Takmazov2019-03-01 16:40:49 +0300
commitc693f54a6118784c05a44993de9eed5af050b55e (patch)
treee5bdd6951e2af5ee75e67d2c991458890d5dd146 /src
parentb02d6b11957b32afe2ef569c095add695a7ecf28 (diff)
Fix external auth
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()));