]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/util/Notary.java
fix: prevent assuring no names when submitting verification form
[gigi.git] / src / org / cacert / gigi / util / Notary.java
index cba93aba8ee78f92a6b40b00252d8bc7c55eaf6b..280bce39d4b45b50a9fea16a1f66405cf60ce349 100644 (file)
@@ -239,6 +239,9 @@ public class Notary {
     }
 
     public synchronized static void assureAll(User assurer, User assuree, DayDate dob, int awarded, String location, String date, AssuranceType type, Name[] toAssure) throws GigiApiException {
+        if (toAssure.length == 0) {
+            throw new GigiApiException("You must confirm at least one name to verify an account.");
+        }
         boolean[] hadLessThan50Points = new boolean[toAssure.length];
         boolean hadTotalLessThan100 = assuree.getAssurancePoints() < 100;
         for (int i = 0; i < toAssure.length; i++) {