X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=src%2Fclub%2Fwpia%2Fgigi%2Fpages%2Faccount%2Fcerts%2FCertificateIssueForm.java;h=81925716caba4cc8376f47b312f0242f85473751;hb=e7532e90c74f2fd2559c6afead1748b2f29edf8e;hp=b162a26f0d04961ea8b4bcc232669678de111021;hpb=5ff16bf1cd44c001f134e3eabfb30ecd6e78c08c;p=gigi.git diff --git a/src/club/wpia/gigi/pages/account/certs/CertificateIssueForm.java b/src/club/wpia/gigi/pages/account/certs/CertificateIssueForm.java index b162a26f..81925716 100644 --- a/src/club/wpia/gigi/pages/account/certs/CertificateIssueForm.java +++ b/src/club/wpia/gigi/pages/account/certs/CertificateIssueForm.java @@ -99,6 +99,13 @@ public class CertificateIssueForm extends Form { if (login) { result.setLoginEnabled(true); } + if (req.getParameter("description") != null) { + String description = req.getParameter("description").trim(); + if (description.length() > 100) { + throw new GigiApiException("Submitted description is longer than 100 characters."); + } + result.setDescription(description); + } result.issue(issueDate.getFrom(), issueDate.getTo(), c.getActor()).waitFor(60000); this.result = result; Certificate c = result; @@ -142,7 +149,6 @@ public class CertificateIssueForm extends Form { @Override protected void outputContent(PrintWriter out, Language l, Map vars) { HashMap vars2 = new HashMap(vars); - StringBuffer content = new StringBuffer(); for (SubjectAlternateName SAN : cr.getSANs()) { content.append(SAN.getType().toString().toLowerCase());