aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2023-11-22 23:02:24 +0300
committerGravatar Vitaly Takmazov2023-11-22 23:14:07 +0300
commitcbe520ca2bd73a4e281105ca8579645c8786b080 (patch)
tree08fbf696d5b927ea38a15624d428a87511dc669e /src/main/java
parent845b57ca5f1c5e7aa5767ca849784eb6ed272507 (diff)
ActivityPub: handle all exceptions in signature verification
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/juick/ActivityPubManager.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/com/juick/ActivityPubManager.java b/src/main/java/com/juick/ActivityPubManager.java
index 33cc458b..f234969b 100644
--- a/src/main/java/com/juick/ActivityPubManager.java
+++ b/src/main/java/com/juick/ActivityPubManager.java
@@ -462,8 +462,8 @@ public class ActivityPubManager implements ActivityListener, NotificationListene
}
}
if (key != null) {
- Verifier verifier = new Verifier(key, signature);
try {
+ Verifier verifier = new Verifier(key, signature);
boolean result = verifier.verify(method.toLowerCase(), path, headers);
if (result) {
if (!user.isAnonymous()) {
@@ -481,8 +481,7 @@ public class ActivityPubManager implements ActivityListener, NotificationListene
}
}
}
- } catch (NoSuchAlgorithmException | SignatureException | MissingRequiredHeaderException
- | IOException e) {
+ } catch (Exception e) {
logger.warn("Verification error for {}: {}", signature.getKeyId(), e.getMessage());
}
}