Increase the possible length of “returnPage” because 64 is too short.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 21 Nov 2010 17:22:12 +0000 (18:22 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 21 Nov 2010 17:22:12 +0000 (18:22 +0100)
src/main/java/net/pterodactylus/sone/web/CreatePostPage.java
src/main/java/net/pterodactylus/sone/web/CreateReplyPage.java
src/main/java/net/pterodactylus/sone/web/DeletePostPage.java
src/main/java/net/pterodactylus/sone/web/DeleteReplyPage.java
src/main/java/net/pterodactylus/sone/web/DismissNotificationPage.java
src/main/java/net/pterodactylus/sone/web/FollowSonePage.java
src/main/java/net/pterodactylus/sone/web/LikePage.java
src/main/java/net/pterodactylus/sone/web/LockSonePage.java
src/main/java/net/pterodactylus/sone/web/UnfollowSonePage.java
src/main/java/net/pterodactylus/sone/web/UnlikePage.java
src/main/java/net/pterodactylus/sone/web/UnlockSonePage.java

index 1b7271b..10a8c7a 100644 (file)
@@ -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) {
index 65e8e57..2bfab6f 100644 (file)
@@ -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) {
index 761be50..4a64ad0 100644 (file)
@@ -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)) {
index c61dcf3..00a1a0e 100644 (file)
@@ -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)) {
index 4981afb..b1838da 100644 (file)
@@ -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);
        }
 
index 0367f6a..c71c280 100644 (file)
@@ -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);
index cb72782..dd693ef 100644 (file)
@@ -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);
index 767e89c..05c8ad7 100644 (file)
@@ -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);
        }
 
index 396e263..5b0c652 100644 (file)
@@ -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);
index e794582..1ecacc8 100644 (file)
@@ -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);
index fe5c894..938e451 100644 (file)
@@ -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);
        }