aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2014-05-03 16:14:18 +0700
committerGravatar Ugnich Anton2014-05-03 16:14:18 +0700
commit5990e6c679cf0449bb3357647d1adaf7cedebe70 (patch)
tree61f4a761fedf4d144fa97f78f3ace0d87aa8220e /src
parent343ef5b9cde33394cfc076b46bcf2d680d6d2e5c (diff)
Remove \r
Diffstat (limited to 'src')
-rw-r--r--src/java/com/juick/http/www/NewMessage.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/java/com/juick/http/www/NewMessage.java b/src/java/com/juick/http/www/NewMessage.java
index fb5e6784..4bb87404 100644
--- a/src/java/com/juick/http/www/NewMessage.java
+++ b/src/java/com/juick/http/www/NewMessage.java
@@ -143,6 +143,7 @@ public class NewMessage {
response.sendError(400);
return;
}
+ body = body.replace("\r", "");
String tagsStr = request.getParameter("tags");
if (tagsStr == null || tagsStr.isEmpty()) {
@@ -171,6 +172,7 @@ public class NewMessage {
try {
attachmentFName = Utils.receiveMultiPartFile(request, "attach");
} catch (Exception e) {
+ System.out.println("MULTIPART ERROR: " + e.toString());
response.sendError(400);
return;
}
@@ -269,6 +271,7 @@ public class NewMessage {
response.sendError(400);
return;
}
+ body = body.replace("\r", "");
if ((msg.ReadOnly && msg.User.UID != visitor.UID) || UserQueries.isInBLAny(sql, msg.User.UID, visitor.UID) || (reply != null && UserQueries.isInBLAny(sql, reply.User.UID, visitor.UID))) {
response.sendError(403);
@@ -279,6 +282,7 @@ public class NewMessage {
try {
attachmentFName = Utils.receiveMultiPartFile(request, "attach");
} catch (Exception e) {
+ System.out.println("MULTIPART ERROR: " + e.toString());
response.sendError(400);
return;
}