From 952e56e8a89eb706d8ff5e2f652c165b646a06f3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 21 Nov 2010 18:22:12 +0100 Subject: [PATCH] =?utf8?q?Increase=20the=20possible=20length=20of=20?= =?utf8?q?=E2=80=9CreturnPage=E2=80=9D=20because=2064=20is=20too=20short.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/sone/web/CreatePostPage.java | 2 +- src/main/java/net/pterodactylus/sone/web/CreateReplyPage.java | 2 +- src/main/java/net/pterodactylus/sone/web/DeletePostPage.java | 2 +- src/main/java/net/pterodactylus/sone/web/DeleteReplyPage.java | 2 +- src/main/java/net/pterodactylus/sone/web/DismissNotificationPage.java | 2 +- src/main/java/net/pterodactylus/sone/web/FollowSonePage.java | 2 +- src/main/java/net/pterodactylus/sone/web/LikePage.java | 2 +- src/main/java/net/pterodactylus/sone/web/LockSonePage.java | 2 +- src/main/java/net/pterodactylus/sone/web/UnfollowSonePage.java | 2 +- src/main/java/net/pterodactylus/sone/web/UnlikePage.java | 2 +- src/main/java/net/pterodactylus/sone/web/UnlockSonePage.java | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/web/CreatePostPage.java b/src/main/java/net/pterodactylus/sone/web/CreatePostPage.java index 1b7271b..10a8c7a 100644 --- a/src/main/java/net/pterodactylus/sone/web/CreatePostPage.java +++ b/src/main/java/net/pterodactylus/sone/web/CreatePostPage.java @@ -51,7 +51,7 @@ public class CreatePostPage extends SoneTemplatePage { @Override protected void processTemplate(Request request, Template template) throws RedirectException { super.processTemplate(request, template); - String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 64); + String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 256); if (request.getMethod() == Method.POST) { String text = request.getHttpRequest().getPartAsStringFailsafe("text", 65536).trim(); if (text.length() != 0) { diff --git a/src/main/java/net/pterodactylus/sone/web/CreateReplyPage.java b/src/main/java/net/pterodactylus/sone/web/CreateReplyPage.java index 65e8e57..2bfab6f 100644 --- a/src/main/java/net/pterodactylus/sone/web/CreateReplyPage.java +++ b/src/main/java/net/pterodactylus/sone/web/CreateReplyPage.java @@ -53,7 +53,7 @@ public class CreateReplyPage extends SoneTemplatePage { super.processTemplate(request, template); String postId = request.getHttpRequest().getPartAsStringFailsafe("post", 36); String text = request.getHttpRequest().getPartAsStringFailsafe("text", 65536).trim(); - String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 64); + String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 256); if (request.getMethod() == Method.POST) { Post post = webInterface.getCore().getPost(postId); if (text.length() > 0) { diff --git a/src/main/java/net/pterodactylus/sone/web/DeletePostPage.java b/src/main/java/net/pterodactylus/sone/web/DeletePostPage.java index 761be50..4a64ad0 100644 --- a/src/main/java/net/pterodactylus/sone/web/DeletePostPage.java +++ b/src/main/java/net/pterodactylus/sone/web/DeletePostPage.java @@ -60,7 +60,7 @@ public class DeletePostPage extends SoneTemplatePage { return; } else if (request.getMethod() == Method.POST) { String postId = request.getHttpRequest().getPartAsStringFailsafe("post", 36); - String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 64); + String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 256); Post post = webInterface.getCore().getPost(postId); Sone currentSone = getCurrentSone(request.getToadletContext()); if (!post.getSone().equals(currentSone)) { diff --git a/src/main/java/net/pterodactylus/sone/web/DeleteReplyPage.java b/src/main/java/net/pterodactylus/sone/web/DeleteReplyPage.java index c61dcf3..00a1a0e 100644 --- a/src/main/java/net/pterodactylus/sone/web/DeleteReplyPage.java +++ b/src/main/java/net/pterodactylus/sone/web/DeleteReplyPage.java @@ -53,7 +53,7 @@ public class DeleteReplyPage extends SoneTemplatePage { super.processTemplate(request, template); String replyId = request.getHttpRequest().getPartAsStringFailsafe("reply", 36); Reply reply = webInterface.getCore().getReply(replyId); - String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 64); + String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 256); if (request.getMethod() == Method.POST) { Sone currentSone = getCurrentSone(request.getToadletContext()); if (!reply.getSone().equals(currentSone)) { diff --git a/src/main/java/net/pterodactylus/sone/web/DismissNotificationPage.java b/src/main/java/net/pterodactylus/sone/web/DismissNotificationPage.java index 4981afb..b1838da 100644 --- a/src/main/java/net/pterodactylus/sone/web/DismissNotificationPage.java +++ b/src/main/java/net/pterodactylus/sone/web/DismissNotificationPage.java @@ -54,7 +54,7 @@ public class DismissNotificationPage extends SoneTemplatePage { if ((notification != null) && notification.isDismissable()) { notification.dismiss(); } - String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 64); + String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 256); throw new RedirectException(returnPage); } diff --git a/src/main/java/net/pterodactylus/sone/web/FollowSonePage.java b/src/main/java/net/pterodactylus/sone/web/FollowSonePage.java index 0367f6a..c71c280 100644 --- a/src/main/java/net/pterodactylus/sone/web/FollowSonePage.java +++ b/src/main/java/net/pterodactylus/sone/web/FollowSonePage.java @@ -50,7 +50,7 @@ public class FollowSonePage extends SoneTemplatePage { super.processTemplate(request, template); if (request.getMethod() == Method.POST) { String soneId = request.getHttpRequest().getPartAsStringFailsafe("sone", 44); - String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 64); + String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 256); Sone currentSone = getCurrentSone(request.getToadletContext()); currentSone.addFriend(soneId); webInterface.getCore().saveSone(currentSone); diff --git a/src/main/java/net/pterodactylus/sone/web/LikePage.java b/src/main/java/net/pterodactylus/sone/web/LikePage.java index cb72782..dd693ef 100644 --- a/src/main/java/net/pterodactylus/sone/web/LikePage.java +++ b/src/main/java/net/pterodactylus/sone/web/LikePage.java @@ -54,7 +54,7 @@ public class LikePage extends SoneTemplatePage { if (request.getMethod() == Method.POST) { String type=request.getHttpRequest().getPartAsStringFailsafe("type", 16); String id = request.getHttpRequest().getPartAsStringFailsafe(type, 36); - String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 64); + String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 256); Sone currentSone = getCurrentSone(request.getToadletContext()); if ("post".equals(type)) { currentSone.addLikedPostId(id); diff --git a/src/main/java/net/pterodactylus/sone/web/LockSonePage.java b/src/main/java/net/pterodactylus/sone/web/LockSonePage.java index 767e89c..05c8ad7 100644 --- a/src/main/java/net/pterodactylus/sone/web/LockSonePage.java +++ b/src/main/java/net/pterodactylus/sone/web/LockSonePage.java @@ -55,7 +55,7 @@ public class LockSonePage extends SoneTemplatePage { if (sone != null) { webInterface.getCore().lockSone(sone); } - String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 64); + String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 256); throw new RedirectException(returnPage); } diff --git a/src/main/java/net/pterodactylus/sone/web/UnfollowSonePage.java b/src/main/java/net/pterodactylus/sone/web/UnfollowSonePage.java index 396e263..5b0c652 100644 --- a/src/main/java/net/pterodactylus/sone/web/UnfollowSonePage.java +++ b/src/main/java/net/pterodactylus/sone/web/UnfollowSonePage.java @@ -50,7 +50,7 @@ public class UnfollowSonePage extends SoneTemplatePage { super.processTemplate(request, template); if (request.getMethod() == Method.POST) { String soneId = request.getHttpRequest().getPartAsStringFailsafe("sone", 44); - String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 64); + String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 256); Sone currentSone = getCurrentSone(request.getToadletContext()); currentSone.removeFriend(soneId); webInterface.getCore().saveSone(currentSone); diff --git a/src/main/java/net/pterodactylus/sone/web/UnlikePage.java b/src/main/java/net/pterodactylus/sone/web/UnlikePage.java index e794582..1ecacc8 100644 --- a/src/main/java/net/pterodactylus/sone/web/UnlikePage.java +++ b/src/main/java/net/pterodactylus/sone/web/UnlikePage.java @@ -54,7 +54,7 @@ public class UnlikePage extends SoneTemplatePage { if (request.getMethod() == Method.POST) { String type = request.getHttpRequest().getPartAsStringFailsafe("type", 16); String id = request.getHttpRequest().getPartAsStringFailsafe(type, 36); - String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 64); + String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 256); Sone currentSone = getCurrentSone(request.getToadletContext()); if ("post".equals(type)) { currentSone.removeLikedPostId(id); diff --git a/src/main/java/net/pterodactylus/sone/web/UnlockSonePage.java b/src/main/java/net/pterodactylus/sone/web/UnlockSonePage.java index fe5c894..938e451 100644 --- a/src/main/java/net/pterodactylus/sone/web/UnlockSonePage.java +++ b/src/main/java/net/pterodactylus/sone/web/UnlockSonePage.java @@ -54,7 +54,7 @@ public class UnlockSonePage extends SoneTemplatePage { if (sone != null) { webInterface.getCore().unlockSone(sone); } - String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 64); + String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 256); throw new RedirectException(returnPage); } -- 2.7.4