aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/server/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/server/api')
-rw-r--r--src/main/java/com/juick/server/api/Post.java9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/main/java/com/juick/server/api/Post.java b/src/main/java/com/juick/server/api/Post.java
index 303ff109..2c7346b3 100644
--- a/src/main/java/com/juick/server/api/Post.java
+++ b/src/main/java/com/juick/server/api/Post.java
@@ -70,11 +70,8 @@ public class Post {
@RequestParam(required = false) MultipartFile attach) throws Exception {
User visitor = UserUtils.getCurrentUser();
- if (visitor.isAnonymous())
+ if (visitor.isAnonymous()) {
throw new HttpForbiddenException();
-
- if (body.length() > 4096) {
- throw new HttpBadRequestException();
}
body = body.replace("\r", StringUtils.EMPTY);
@@ -129,10 +126,6 @@ public class Post {
throw new HttpNotFoundException();
}
}
-
- if (body.length() > 4096) {
- throw new HttpBadRequestException();
- }
body = body.replace("\r", StringUtils.EMPTY);
if ((msg.ReadOnly && msg.getUser().getUid() != vuid) || userService.isInBLAny(msg.getUser().getUid(), vuid)