aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/ActivityPubManager.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2020-11-10 16:36:02 +0300
committerGravatar Vitaly Takmazov2020-11-10 16:36:02 +0300
commit07ebf86ab279811c365e8174807dbf36fc2f4ca4 (patch)
tree9413da0d168bda99a8921eda9c97d4dd9341eb52 /src/main/java/com/juick/ActivityPubManager.java
parenta0a70fd3c0b031426a34b4d62a7b3e11f1a90c64 (diff)
ActivityPub: Digest header is mandatory now for POST requests
Diffstat (limited to 'src/main/java/com/juick/ActivityPubManager.java')
-rw-r--r--src/main/java/com/juick/ActivityPubManager.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/com/juick/ActivityPubManager.java b/src/main/java/com/juick/ActivityPubManager.java
index e3b1ac8e..22fe826f 100644
--- a/src/main/java/com/juick/ActivityPubManager.java
+++ b/src/main/java/com/juick/ActivityPubManager.java
@@ -54,6 +54,7 @@ import java.io.IOException;
import java.io.StringWriter;
import java.io.Writer;
import java.net.URI;
+import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@@ -104,7 +105,7 @@ public class ActivityPubManager implements ActivityListener, NotificationListene
signatureManager.post(me, follower, accept);
socialService.addFollower(followedUser, follower.getId());
logger.info("Follower added for {}", followedUser.getName());
- } catch (IOException e) {
+ } catch (IOException | NoSuchAlgorithmException e) {
logger.info("activitypub exception", e);
}
}
@@ -145,7 +146,7 @@ public class ActivityPubManager implements ActivityListener, NotificationListene
try {
logger.info("Deletion to follower {}", follower.getId());
signatureManager.post(me, follower, delete);
- } catch (IOException e) {
+ } catch (IOException | NoSuchAlgorithmException e) {
logger.warn("activitypub exception", e);
}
});
@@ -194,7 +195,7 @@ public class ActivityPubManager implements ActivityListener, NotificationListene
try {
logger.info("Update to follower {}", follower.getId());
signatureManager.post(me, follower, update);
- } catch (IOException e) {
+ } catch (IOException | NoSuchAlgorithmException e) {
logger.warn("activitypub exception", e);
}
});
@@ -239,7 +240,7 @@ public class ActivityPubManager implements ActivityListener, NotificationListene
create.setObject(note);
try {
signatureManager.post(me, follower, create);
- } catch (IOException e) {
+ } catch (IOException | NoSuchAlgorithmException e) {
logger.warn("activitypub exception", e);
}
}
@@ -386,7 +387,7 @@ public class ActivityPubManager implements ActivityListener, NotificationListene
try {
logger.info("Announcing top: {}", message.getMid());
signatureManager.post(me, (Person)person, announce);
- } catch (IOException e) {
+ } catch (IOException | NoSuchAlgorithmException e) {
logger.warn("activitypub exception", e);
}
}, () -> logger.warn("Follower not found: {}", acct));