]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/pages/Verify.java
add: prevent supporters from modifying their own accounts via support
[gigi.git] / src / org / cacert / gigi / pages / Verify.java
index 0c8485420208067b74aaeae436e6e972da5d1b96..2a5950e91e23e586329cec5446f3f0707bcca228 100644 (file)
@@ -2,6 +2,7 @@ package org.cacert.gigi.pages;
 
 import java.io.IOException;
 import java.io.PrintWriter;
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -18,9 +19,9 @@ import org.cacert.gigi.output.template.SprintfCommand;
 
 public class Verify extends Page {
 
-    private static final SprintfCommand emailAddressVerified = new SprintfCommand("Email address ${subject} verified");
+    private static final SprintfCommand emailAddressVerified = new SprintfCommand("Email address {0} verified", Arrays.asList("${subject}"));
 
-    private static final SprintfCommand domainVerified = new SprintfCommand("Domain ${subject} verified");
+    private static final SprintfCommand domainVerified = new SprintfCommand("Domain {0} verified", Arrays.asList("${subject}"));
 
     private class VerificationForm extends Form {
 
@@ -100,11 +101,7 @@ public class Verify extends Page {
 
     @Override
     public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
-        try {
-            if (Form.getForm(req, VerificationForm.class).submit(resp.getWriter(), req)) {
-            }
-        } catch (GigiApiException e) {
-            e.format(resp.getWriter(), getLanguage(req));
+        if (Form.getForm(req, VerificationForm.class).submitProtected(resp.getWriter(), req)) {
         }
     }