]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/dbObjects/Domain.java
upd: make verification processes more consistent on failure
[gigi.git] / src / org / cacert / gigi / dbObjects / Domain.java
index 36b7dc6f651dec5c071f15796ac38c42a3117a56..3ecf728567f6c166aa5dc960091c8c26061c6f28 100644 (file)
@@ -129,7 +129,9 @@ public class Domain implements IdCachable, Verifyable {
         try (GigiPreparedStatement ps = new GigiPreparedStatement("UPDATE `domainPinglog` SET `state`='success' WHERE `challenge`=? AND `state`='open' AND `configId` IN (SELECT `id` FROM `pingconfig` WHERE `domainid`=? AND `type`='email')")) {
             ps.setString(1, hash);
             ps.setInt(2, id);
-            ps.executeUpdate();
+            if ( !ps.executeMaybeUpdate()) {
+                throw new IllegalArgumentException("Given token could not be found to complete the verification process (Domain Ping).");
+            }
         }
     }