]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/pages/admin/support/SupportUserDetailsPage.java
UPD: Don't count revoked 'valid' certs as valid
[gigi.git] / src / org / cacert / gigi / pages / admin / support / SupportUserDetailsPage.java
index 234448088d91f5bcaa82b1eb357f8f81c25995db..924ba08b17c1c562808c1035518481160d8f296b 100644 (file)
@@ -27,9 +27,13 @@ public class SupportUserDetailsPage extends Page {
 
     @Override
     public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
-        int id;
+        int id = -1;
         String[] idP = req.getPathInfo().split("/");
-        id = Integer.parseInt(idP[idP.length - 1]);
+        try {
+            id = Integer.parseInt(idP[idP.length - 1]);
+        } catch (NumberFormatException e) {
+            resp.sendError(404);
+        }
         final User user = User.getById(id);
         String ticket = (String) req.getSession().getAttribute("ticketNo" + user.getId());
         SupportUserDetailsForm f = new SupportUserDetailsForm(req, new SupportedUser(user, getUser(req), ticket));