From 5990e6c679cf0449bb3357647d1adaf7cedebe70 Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Sat, 3 May 2014 16:14:18 +0700 Subject: Remove \r --- src/java/com/juick/http/www/NewMessage.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/java/com/juick/http') 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; } -- cgit v1.2.3