X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=src%2Forg%2Fcacert%2Fgigi%2Fpages%2Fadmin%2Fsupport%2FSupportUserDetailsPage.java;h=924ba08b17c1c562808c1035518481160d8f296b;hb=f0b9b09f6cc96110ec0974d085bd05bef403a9c6;hp=234448088d91f5bcaa82b1eb357f8f81c25995db;hpb=117feb522905ad14aeacea42742c77035f2dd6cb;p=gigi.git diff --git a/src/org/cacert/gigi/pages/admin/support/SupportUserDetailsPage.java b/src/org/cacert/gigi/pages/admin/support/SupportUserDetailsPage.java index 23444808..924ba08b 100644 --- a/src/org/cacert/gigi/pages/admin/support/SupportUserDetailsPage.java +++ b/src/org/cacert/gigi/pages/admin/support/SupportUserDetailsPage.java @@ -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));