]> WPIA git - gigi.git/commitdiff
fix: more descriptive error message
authorFelix Dörre <felix@dogcraft.de>
Sun, 12 Jun 2016 14:46:03 +0000 (16:46 +0200)
committerFelix Dörre <felix@dogcraft.de>
Sun, 12 Jun 2016 14:46:03 +0000 (16:46 +0200)
Change-Id: I4a77d3c98fb8ee4c31f644a3e88b0104e61fff0d

src/org/cacert/gigi/api/CATSResolve.java

index 5da539409ff702f9120632c1977235c13fc4422a..1b25e9d5dd241c49d8e04f94272ad9b505ff1670 100644 (file)
@@ -22,9 +22,12 @@ public class CATSResolve extends APIPoint {
         if ( !((Organisation) u).isSelfOrganisation()) {
             resp.sendError(500, "Error, invalid cert");
             return;
         if ( !((Organisation) u).isSelfOrganisation()) {
             resp.sendError(500, "Error, invalid cert");
             return;
-
         }
         String target = req.getParameter("serial");
         }
         String target = req.getParameter("serial");
+        if (target == null) {
+            resp.sendError(500, "Error, requires a serial parameter");
+            return;
+        }
 
         CertificateOwner o = CertificateOwner.getByEnabledSerial(target);
         if ( !(o instanceof User)) {
 
         CertificateOwner o = CertificateOwner.getByEnabledSerial(target);
         if ( !(o instanceof User)) {