X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=src%2Fclub%2Fwpia%2Fgigi%2Fpages%2Faccount%2Fcerts%2FCertificateRequest.java;h=28a5b098b75f73254884217743a7f3e4f4e2fddd;hp=cdf4dd41eed765b5959cb979d571a9462d0bd89f;hb=4869b9224eed6aad66ea926c808bcbcfa472012b;hpb=be0c267ced95d9e08e179ad222439198b0176ac6 diff --git a/src/club/wpia/gigi/pages/account/certs/CertificateRequest.java b/src/club/wpia/gigi/pages/account/certs/CertificateRequest.java index cdf4dd41..28a5b098 100644 --- a/src/club/wpia/gigi/pages/account/certs/CertificateRequest.java +++ b/src/club/wpia/gigi/pages/account/certs/CertificateRequest.java @@ -371,7 +371,7 @@ public class CertificateRequest { } else { // remove error.mergeInto(new GigiApiException(SprintfCommand.createSimple(// - "The requested subject alternate name email address \"{0}\" needs an email ping within the past {1} months.", san.getType().toString().toLowerCase() + ":" + san.getName(), TimeConditions.getInstance().getEmailPingMonths()))); + "The requested subject alternate name email address \"{0}\" needs a verification via email ping within the past {1} months.", san.getType().toString().toLowerCase() + ":" + san.getName(), TimeConditions.getInstance().getEmailPingMonths()))); break; } } @@ -443,7 +443,7 @@ public class CertificateRequest { subject.put("OU", ou); } } - System.out.println(subject); + if ( !error.isEmpty()) { throw error; } @@ -493,7 +493,11 @@ public class CertificateRequest { User u = (User) ctx.getTarget(); if (name != null && u.isValidName(name)) { if (realIsOK) { - verifiedCN = name; + if (u.isValidNameVerification(name)) { + verifiedCN = name; + } else { + error.mergeInto(new GigiApiException(SprintfCommand.createSimple("The entered name needs a valid verification within the last {0} months.", TimeConditions.getInstance().getVerificationMonths()))); + } } else { error.mergeInto(new GigiApiException("Your real name is not allowed in this certificate.")); if (defaultIsOK) {