Text may not contain "?>".
If the text contains "$" or "!'" it is interpreted as "advanced replacement".
- ${variablename} is interpreted as "output this variable at this point"
+ - $!{variablename} is interpreted as "output this variable unescaped at this point"
+ - !(/link) is interpreted as "output an opening <a>-tag to '/link' at this point" (which must be closed, e.g. using !'</a>', see below)
- !'literal content' output "literal content" here and do not translate or escape. (literal content may not contain any of: {}'$ )
Then the whole text than also may not contain "{" and "}".
--- /dev/null
+/policy
+/policy/ToS
+/policy/CPS
+/policy/verification
+/wiki/agentQualifyingChallenge
+/wiki/gigi
+/wiki/CSR
+/wiki/names
+/wiki/lostPassword
+/wiki/goodPassword
+/wiki/verificationHandbook
+/ttp/user
+/ttp/country
public final class Gigi extends HttpServlet {
+ public static final String LINK_HOST = "linkHost";
+
private class MenuBuilder {
private LinkedList<Menu> categories = new LinkedList<Menu>();
vars.put("static", isSecure ? staticTemplateVarSecure : staticTemplateVar);
vars.put("year", Calendar.getInstance().get(Calendar.YEAR));
vars.put("content", content);
+ if (isSecure) {
+ req.setAttribute(LINK_HOST, ServerConstants.getLinkHostNamePortSecure());
+ } else {
+ req.setAttribute(LINK_HOST, ServerConstants.getLinkHostNamePort());
+ }
if (currentAuthContext != null) {
// TODO maybe move this information into the AuthContext object
vars.put("loginMethod", req.getSession().getAttribute(LOGIN_METHOD));
<hr/>
<div id="siteInfo">
Page info
- <!-- <a href="//wiki.cacert.org/FAQ/AboutUs"><?=_About Us?></a> |
- <a href="/index.php?id=13"><?=_Donations?></a> |
- <a href="//wiki.cacert.org/wiki/CAcertIncorporated"><?=_Association Membership?></a> |
- <a href="/policy/PrivacyPolicy.html"><?=_Privacy Policy?></a> |
- <a href="/index.php?id=51"><?=_Mission Statement?></a> |
- <a href="/index.php?id=11"><?=_Contact Us?></a> --> |
©2016-<?=$year?> SomeCA
</div>
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import club.wpia.gigi.Gigi;
import club.wpia.gigi.localisation.Language;
import club.wpia.gigi.util.HTMLEncoder;
* a string with <code>{0},{1},..</code> as placeholders.
* @param store
* the data to put into the placeholders: ${var}, $!{var},
- * !'plain'.
+ * !'plain', !(/link).
*/
public SprintfCommand(String text, List<String> store) {
this.text = text;
private static final String VARIABLE = "\\$!?\\{[a-zA-Z0-9_-]+\\}";
- private static final Pattern processingInstruction = Pattern.compile("(" + VARIABLE + ")|(!'[^{}'\\$]*)'");
+ private static final Pattern processingInstruction = Pattern.compile("(" + VARIABLE + ")|(?:(!'[^{}'\\$]*)')|(?:(!\\([^{})\\$]*)\\))");
/**
* Creates a new SprintfCommand that is parsed as from template source.
var.add(group);
} else if ((group = m.group(2)) != null) {
var.add(group);
+ } else if ((group = m.group(3)) != null) {
+ var.add(group);
} else {
throw new Error("Regex is broken??");
}
Template.outputVar(out, l, vars, var.substring(3, var.length() - 1), true);
} else if (var.startsWith("!'")) {
out.print(var.substring(2));
+ } else if (var.startsWith("!(")) {
+ String host = (String) vars.get(Gigi.LINK_HOST);
+ if (host == null) {
+ throw new Error("Unconfigured link-host while interpreting link-syntax.");
+ }
+ if (var.charAt(2) != '/') {
+ throw new Error("Need an absolute link for the link service.");
+ }
+ String link = "//" + host + var.substring(2);
+ out.print("<a href='" + HTMLEncoder.encodeHTML(link) + "'>");
} else if (var.startsWith("$")) {
Template.outputVar(out, l, vars, var.substring(2, var.length() - 1), false);
} else {
import java.io.IOException;
import java.io.PrintWriter;
import java.security.cert.X509Certificate;
-import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import club.wpia.gigi.util.AuthorizationContext;
import club.wpia.gigi.util.PasswordHash;
import club.wpia.gigi.util.RateLimit;
-import club.wpia.gigi.util.ServerConstants;
import club.wpia.gigi.util.RateLimit.RateLimitException;
+import club.wpia.gigi.util.ServerConstants;
public class LoginPage extends Page {
if (req.getHeader("Host").equals(ServerConstants.getSecureHostNamePortSecure())) {
resp.getWriter().println(getLanguage(req).getTranslation("Authentication with certificate failed. Try another certificate or use a password."));
} else {
- new LoginForm(req).output(resp.getWriter(), getLanguage(req), new HashMap<String, Object>());
+ new LoginForm(req).output(resp.getWriter(), getLanguage(req), getDefaultVars(req));
}
}
@Override
public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
if (Form.printFormErrors(req, resp.getWriter())) {
- Form.getForm(req, LoginForm.class).output(resp.getWriter(), getLanguage(req), new HashMap<String, Object>());
+ Form.getForm(req, LoginForm.class).output(resp.getWriter(), getLanguage(req), getDefaultVars(req));
}
}
<label for="username"><?=_Email Address?>:</label><input class="form-control" type='text' name="username" required/><br />
<label for="password"><?=_Pass Phrase?>:</label><input class="form-control" type='password' name='password' required/><br />
<button type='submit' name="process" value="Login" class="btn btn-primary"><?=_Login?></button><br /><br />
-<p class='smalltext'><?=_If you are having trouble with your username or password, please visit our !'<a href="http://wiki.cacert.org/wiki/FAQ/LostPasswordOrAccount" target="_new">'wiki page!'</a>' for more information?></p>
+<p class='smalltext'><?=_If you are having trouble with your username or password, please visit our !(/wiki/lostPassword)wiki page!'</a>' for more information?></p>
</div>
package club.wpia.gigi.pages;
import java.io.IOException;
-import java.util.HashMap;
+import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Override
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
+ Map<String, Object> vars = getDefaultVars(req);
if (LoginPage.getUser(req) != null) {
- getDefaultTemplate().output(resp.getWriter(), getLanguage(req), new HashMap<String, Object>());
+ getDefaultTemplate().output(resp.getWriter(), getLanguage(req), vars);
} else {
- notLog.output(resp.getWriter(), getLanguage(req), new HashMap<String, Object>());
+ notLog.output(resp.getWriter(), getLanguage(req), vars);
}
}
<p><?=_Once you have verified your company you will see these menu options. They allow you to issue as many certificates as you like without proving individual email accounts as you like, further more you are able to get your company details on the certificate.?></p>
<h4><?=_ET Web of Trust?></h4>
<p><?=_The Web of Trust system ET uses is similar to that many involved with GPG/PGP use, they hold face to face meetings to verify each others photo identities match their GPG/PGP key information. ET differs however in that we have modified things to work within the PKI framework, for you to gain trust in the system you must first locate someone already trusted. The trust person depending how many people they've trusted or meet before will determine how many points they can issue to you. Once you've met up you can show your ID and you will need to fill out a verification form which the person verifying your details must retain for verification reasons.?></p>
-<p><b><?=_For information about the TTP-assisted-verification program please read !'<a href="//wiki.cacert.org/TTP/TTPuser">https://wiki.cacert.org/TTP/TTPuser</a>' and !'<a href="//wiki.cacert.org/TTP/TTPAL"> https://wiki.cacert.org/TTP/TTPAL</a>'.?></b></p>
<h3><?=_For SomeCA Community Members?></h3>
-<p><?=_Have you passed the SomeCA !'<a href="http://wiki.cacert.org/wiki/AssurerChallenge">'Agent Qualifying Challenge!'</a>' yet??></p>
+<p><?=_Have you passed the SomeCA !(/wiki/agentQualifyingChallenge)'Agent Qualifying Challenge!'</a>' yet??></p>
-<p><?=_Have you read the !'<a href="/policy/TermsofService.html">'Terms of Service!'</a>' yet??></p>
+<p><?=_Have you read the !(/policy/ToS)Terms of Service!'</a>' yet??></p>
-<p><?=_For general documentation and help, please visit the SomeCA !'<a href="http://wiki.SomeCA.org">'Wiki Documentation site!'</a>'.?>
-<?=_For specific policies, see the SomeCA !'<a href="/policy/">'Approved Policies page!'</a>'.?></p>
+<p><?=_For general documentation and help, please visit the SomeCA !(/wiki/gigi)Wiki Documentation site!'</a>'.?>
+<?=_For specific policies, see the SomeCA !(/policy)Approved Policies page!'</a>'.?></p>
package club.wpia.gigi.pages;
import java.io.IOException;
-import java.util.HashMap;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
if (Form.printFormErrors(req, resp.getWriter())) {
Form form = Form.getForm(req, c);
- form.output(resp.getWriter(), getLanguage(req), new HashMap<String, Object>());
+ form.output(resp.getWriter(), getLanguage(req), getDefaultVars(req));
}
}
package club.wpia.gigi.pages;
import java.io.IOException;
-import java.util.HashMap;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Override
public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
if (Form.printFormErrors(req, resp.getWriter())) {
- getForm(req).output(resp.getWriter(), getLanguage(req), new HashMap<String, Object>());
+ getForm(req).output(resp.getWriter(), getLanguage(req), getDefaultVars(req));
}
}
package club.wpia.gigi.pages;
import java.io.IOException;
-import java.util.HashMap;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
Form form = Form.getForm(req, c);
if (Form.printFormErrors(req, resp.getWriter())) {
- form.output(resp.getWriter(), getLanguage(req), new HashMap<String, Object>());
+ form.output(resp.getWriter(), getLanguage(req), getDefaultVars(req));
}
}
@Override
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
try {
- c.getConstructor(HttpServletRequest.class).newInstance(req).output(resp.getWriter(), getLanguage(req), new HashMap<String, Object>());
+ c.getConstructor(HttpServletRequest.class).newInstance(req).output(resp.getWriter(), getLanguage(req), getDefaultVars(req));
} catch (ReflectiveOperationException e) {
new GigiApiException().format(resp.getWriter(), getLanguage(req));
}
import java.io.IOException;
import java.net.URL;
import java.util.Enumeration;
+import java.util.HashMap;
import java.util.Locale;
+import java.util.Map;
import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
+import club.wpia.gigi.Gigi;
import club.wpia.gigi.PermissionCheckable;
import club.wpia.gigi.dbObjects.User;
import club.wpia.gigi.localisation.Language;
return !needsLogin() || ac != null;
}
+ /**
+ * Derive a default variable map for template processing.
+ *
+ * @param req
+ * the HTTP-request to derive the map from
+ * @return the map
+ */
+ protected Map<String, Object> getDefaultVars(HttpServletRequest req) {
+ HashMap<String, Object> vars = new HashMap<String, Object>();
+ vars.put(Gigi.LINK_HOST, req.getAttribute(Gigi.LINK_HOST));
+ return vars;
+ }
+
}
<td><input type="password" name="pword2" required></td>
</tr>
<tr>
- <td colspan="2"><span class="formMandatory">*</span><?=_Your password is one of many factors to protect your account from unauthorised access. A good password is hard to guess, long, and contains a diverse set of characters. Learn more in our !'<a href="http://wiki.cacert.org/wiki/FAQ" target="_new">'FAQ!'</a>'.?></td>
+ <td colspan="2"><span class="formMandatory">*</span><?=_Your password is one of many factors to protect your account from unauthorised access. A good password is hard to guess, long, and contains a diverse set of characters. Learn more in our !(/wiki/goodPassword)FAQ!'</a>'.?></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="process" value="<?=_Update Pass Phrase?>"></td>
public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
if (Form.printFormErrors(req, resp.getWriter())) {
PasswordResetForm form = Form.getForm(req, PasswordResetForm.class);
- form.output(resp.getWriter(), getLanguage(req), new HashMap<String, Object>());
+ form.output(resp.getWriter(), getLanguage(req), getDefaultVars(req));
}
}
@Override
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
try {
- new PasswordResetForm(req).output(resp.getWriter(), getLanguage(req), new HashMap<String, Object>());
+ new PasswordResetForm(req).output(resp.getWriter(), getLanguage(req), getDefaultVars(req));
} catch (GigiApiException e) {
e.format(resp.getWriter(), getLanguage(req));
}
<td><input class="form-control" type="password" name="pword2" required></td>
</tr>
<tr>
- <td colspan="2"><span class="formMandatory">*</span><?=_Your password is one of many factors to protect your account from unauthorised access. A good password is hard to guess, long, and contains a diverse set of characters. Learn more in our !'<a href="http://wiki.cacert.org/wiki/FAQ" target="_new">'FAQ!'</a>'.?></td>
+ <td colspan="2"><span class="formMandatory">*</span><?=_Your password is one of many factors to protect your account from unauthorised access. A good password is hard to guess, long, and contains a diverse set of characters. Learn more in our !(/wiki/goodPassword)FAQ!'</a>'.?></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="process" value="<?=_Update Pass Phrase?>"></td>
package club.wpia.gigi.pages.account;
import java.io.IOException;
-import java.util.HashMap;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Override
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
- new ChangeForm(req, getUser(req)).output(resp.getWriter(), getLanguage(req), new HashMap<String, Object>());
+ new ChangeForm(req, getUser(req)).output(resp.getWriter(), getLanguage(req), getDefaultVars(req));
}
@Override
package club.wpia.gigi.pages.account.certs;
import java.io.IOException;
-import java.util.HashMap;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Override
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
- new CertificateIssueForm(req).output(resp.getWriter(), getLanguage(req), new HashMap<String, Object>());
+ new CertificateIssueForm(req).output(resp.getWriter(), getLanguage(req), getDefaultVars(req));
}
@Override
<a href='<?=$serial?>.cer'><?=_DER encoded Certificate?></a><br/>
<a href='<?=$serial?>.cer?install&chain'><?=_Install into browser.?></a><br/>
<a href='<?=$serial?>.cer?install'><?=_Install into browser (Chrome)?></a>. <?=_Please ensure that the intermediate certificates listed above are installed prior to installing the certificate.?>*<br/><br/>
- * <?=_For information on how to install the root certificates into the truststore of your browser take a look at the !'<a href="https://wiki.cacert.org/FAQ/CSR">'FAQ!'</a>'!?>
+ * <?=_For information on how to install the root certificates into the truststore of your browser take a look at the !(/wiki/CSR)FAQ!'</a>'!?>
</td>
</tr>
<h3><?=_SomeCA Acceptable Use Policy?></h3>
<p><?=_I hereby represent that I am fully authorized by the owner of the information contained in the CSR sent to SomeCA to apply for an Digital Certificate for secure and authenticated electronic transactions. I understand that a digital certificate serves to identify the Subscriber for the purposes of electronic communication and that the management of the private keys associated with such certificates is the responsibility of the subscriber's technical staff and/or contractors.?></p>
-<p><?=_CAcert Inc.'s public certification services are governed by a CPS as amended from time to time which is incorporated into this Agreement by reference. The Subscriber will use the SSL Server Certificate in accordance with SomeCA Inc.'s CPS and supporting documentation published at?> <a href="http://www.cacert.org/cps.php">http://www.cacert.org/cps.php</a></p>
+<p><?=_CAcert Inc.'s public certification services are governed by a CPS as amended from time to time which is incorporated into this Agreement by reference. The Subscriber will use the SSL Server Certificate in accordance with SomeCA Inc.'s CPS and supporting documentation published !(/policy/CPS)here!'</a>'.?></p>
<p><?=_If the Subscriber's name and/or domain name registration change the subscriber will immediately inform SomeCA Inc. who shall revoke the digital certificate. When the Digital Certificate expires or is revoked the company will permanently remove the certificate from the server on which it is installed and will not use it for any purpose thereafter. The person responsible for key management and security is fully authorized to install and utilize the certificate to represent this organization's electronic presence.?></p>
<span id="placeholderName" class="js-hint"><?=$placeholderName?></span>
import javax.servlet.http.HttpServletResponse;
import club.wpia.gigi.dbObjects.Certificate;
+import club.wpia.gigi.dbObjects.Certificate.CertificateStatus;
+import club.wpia.gigi.dbObjects.Certificate.SubjectAlternateName;
import club.wpia.gigi.dbObjects.CertificateOwner;
import club.wpia.gigi.dbObjects.Organisation;
import club.wpia.gigi.dbObjects.SupportedUser;
import club.wpia.gigi.dbObjects.User;
-import club.wpia.gigi.dbObjects.Certificate.CertificateStatus;
-import club.wpia.gigi.dbObjects.Certificate.SubjectAlternateName;
import club.wpia.gigi.localisation.Language;
import club.wpia.gigi.output.TrustchainIterable;
import club.wpia.gigi.output.template.Form;
resp.sendError(404);
return;
}
- HashMap<String, Object> vars = new HashMap<>();
+ Map<String, Object> vars = getDefaultVars(req);
vars.put("serial", URLEncoder.encode(serial, "UTF-8"));
CertificateStatus st = c.getStatus();
package club.wpia.gigi.pages.main;
import java.io.IOException;
-import java.util.HashMap;
+import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
}
private void outputGet(HttpServletRequest req, HttpServletResponse resp, Signup s) throws IOException {
- getDefaultTemplate().output(resp.getWriter(), getLanguage(req), new HashMap<String, Object>());
- s.output(resp.getWriter(), getLanguage(req), new HashMap<String, Object>());
+ Map<String, Object> vars = getDefaultVars(req);
+ getDefaultTemplate().output(resp.getWriter(), getLanguage(req), vars);
+ s.output(resp.getWriter(), getLanguage(req), vars);
}
@Override
<?=_Your private information will be used for internal procedures only and will not be shared with third parties.?>
</p>
<p style="border:dotted 1px #900;padding:0.3em;background-color:#ffe;">
-<?=_Your password is one of many factors to protect your account from unauthorised access. A good password is hard to guess, long, and contains a diverse set of characters. Learn more in our !'<a href="http://wiki.cacert.org/wiki/FAQ" target="_new">'FAQ!'</a>'.?>
+<?=_Your password is one of many factors to protect your account from unauthorised access. A good password is hard to guess, long, and contains a diverse set of characters. Learn more in our !(/wiki/goodPassword)FAQ!'</a>'.?>
</p>
import java.io.IOException;
import java.io.PrintWriter;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
@Override
public void outputContent(PrintWriter out, Language l, Map<String, Object> outerVars) {
- HashMap<String, Object> vars = new HashMap<String, Object>();
+ HashMap<String, Object> vars = new HashMap<String, Object>(outerVars);
vars.put("name", ni);
vars.put("dob", myDoB);
vars.put("email", HTMLEncoder.encodeHTML(email));
vars.put("country", country ? " checked=\"checked\"" : "");
vars.put("regional", regional ? " checked=\"checked\"" : "");
vars.put("radius", radius ? " checked=\"checked\"" : "");
- vars.put("helpOnNames", String.format(l.getTranslation("Help on Names %sin the wiki%s"), "<a href=\"#\" target=\"_blank\">", "</a>"));
+ vars.put("helpOnNames", new SprintfCommand("Help on Names {0}in the wiki{1}", Arrays.asList("!(/wiki/names", "!'</a>")));
vars.put("csrf", getCSRFToken());
vars.put("dobmin", User.MINIMUM_AGE + "");
vars.put("countryCode", cs);
</tr>
<tr>
- <td colspan="3"><font color="red">*</font><?=_Your password is one of many factors to protect your account from unauthorised access. A good password is hard to guess, long, and contains a diverse set of characters. Learn more in our !'<a href="http://wiki.cacert.org/wiki/FAQ" target="_new">'FAQ!'</a>'.?></td>
+ <td colspan="3"><font color="red">*</font><?=_Your password is one of many factors to protect your account from unauthorised access. A good password is hard to guess, long, and contains a diverse set of characters. Learn more in our !(/wiki/goodPassword)FAQ!'</a>'.?></td>
</tr>
<tr>
<td colspan="3"><?=_It's possible to get notifications of up and coming events and even just general announcements, untick any notifications you don't wish to receive. For country, regional and radius notifications to work you must choose your location once you've verified your account and logged in.?></td>
<td colspan="3"><?=_When you click on next, we will send a confirmation email to the email address you have entered above.?></td>
</tr>
<tr>
- <td colspan="3"><input type="checkbox" name="tos_agree" value="1"><?=_I agree to the Terms of Service (!'<a href="/policy/TermsOfService.html">'ToS!'</a>').?></td>
+ <td colspan="3"><input type="checkbox" name="tos_agree" value="1"><?=_I agree to the Terms of Service (!(/policy/ToS)ToS!'</a>').?></td>
</tr>
<tr>
import javax.servlet.http.HttpServletRequest;
import club.wpia.gigi.GigiApiException;
+import club.wpia.gigi.dbObjects.Assurance.AssuranceType;
import club.wpia.gigi.dbObjects.Name;
import club.wpia.gigi.dbObjects.User;
-import club.wpia.gigi.dbObjects.Assurance.AssuranceType;
import club.wpia.gigi.localisation.Language;
import club.wpia.gigi.output.ArrayIterable;
import club.wpia.gigi.output.CountrySelector;
@Override
public void outputContent(PrintWriter out, Language l, Map<String, Object> vars) {
- HashMap<String, Object> res = new HashMap<String, Object>();
+ HashMap<String, Object> res = new HashMap<String, Object>(vars);
res.putAll(vars);
res.put("names", new ArrayIterable<Name>(assureeNames) {
- <table class="table">
+<table class="table">
<thead>
<tr><th colspan="2"><?=_Verification Confirmation?></th></tr>
</thead>
</tr>
<tr>
<td><input type="checkbox" name="rules" value="1" required></td>
- <td><?=_I have read and understood the Terms of Service (!'<a href="/policy/TermsOfService.html">'ToS!'</a>'), Verification Policy and the Verification Handbook. I am making this verification subject to and in compliance with the ToS, Verification Policy and Handbook.?></td>
+ <td><?=_I have read and understood the Terms of Service (!(/policy/ToS)ToS!'</a>'), Verification Policy and the Verification Handbook. I am making this verification subject to and in compliance with the ToS, Verification Policy and Handbook.?></td>
</tr>
<tr>
<td><?=_Policy?>: </td>
<td>
- <a href="/policy/TermsOfService.html" target="_blank"><?=_Terms of Service?></a>
- - <a href="/policy/AssurancePolicy.php" target="_blank"><?=_Verification Policy?></a>
- - <a href="http://wiki.cacert.org/AssuranceHandbook2" target="_blank"><?=_Verification Handbook?></a>
+ <?=_!(/policy/ToS)Terms of Service!'</a>'?>
+ - <?=_!(/policy/verification)Verification Policy!'</a>'?></a>
+ - <?=_!(/wiki/verificationHandbook)Verification Handbook!'</a>'?></a>
</td>
</tr>
<tr>
import java.io.IOException;
import java.io.PrintWriter;
-import java.util.HashMap;
+import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
PrintWriter out = resp.getWriter();
- HashMap<String, Object> vars = new HashMap<String, Object>();
+ Map<String, Object> vars = getDefaultVars(req);
vars.put("DoB", ds);
t.output(out, getLanguage(req), vars);
}
if (req.getParameter("search") == null) {
if (Form.printFormErrors(req, out)) {
AssuranceForm form = Form.getForm(req, AssuranceForm.class);
- form.output(out, getLanguage(req), new HashMap<String, Object>());
+ form.output(out, getLanguage(req), getDefaultVars(req));
}
return;
}
} else {
User assuree = User.getById(id);
try {
- new AssuranceForm(req, assuree).output(out, getLanguage(req), new HashMap<String, Object>());
+ new AssuranceForm(req, assuree).output(out, getLanguage(req), getDefaultVars(req));
} catch (GigiApiException e) {
e.format(out, Page.getLanguage(req));
}
package club.wpia.gigi.pages.wot;
import java.io.IOException;
-import java.util.HashMap;
+import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Override
public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
if (Form.printFormErrors(req, resp.getWriter())) {
- Form.getForm(req, RequestTTPForm.class).output(resp.getWriter(), getLanguage(req), new HashMap<String, Object>());
+ Form.getForm(req, RequestTTPForm.class).output(resp.getWriter(), getLanguage(req), getDefaultVars(req));
}
}
@Override
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
User u = LoginPage.getUser(req);
- HashMap<String, Object> map = new HashMap<String, Object>();
+ Map<String, Object> map = getDefaultVars(req);
if (u.isInGroup(RequestTTPForm.TTP_APPLICANT)) {
map.put("inProgress", true);
} else {
<p><?=_In the meanwhile you would need to close this gap with face to face verifications with SomeCA RA Agents. Think not only travelling to populated countries, but also remember that RA Agents may occasionally visit your country or area.?></p>
-<p><?=_If you are interested in the TTP programme, read the pages !'<a href="//wiki.cacert.org/TTP/TTPuser">https://wiki.cacert.org/TTP/TTPuser</a>' for the basic way how the TTP programme works for you, and !'<a href="//wiki.cacert.org/TTP/TTPAL">https://wiki.cacert.org/TTP/TTPAL</a>' whether the TTP programme affects the country where you are located.?> </p>
+<p><?=_If you are interested in the TTP programme, read !(/ttp/user)the pages!'</a>' for the basic way how the TTP programme works for you, and !(/ttp/country)here!'</a>' whether the TTP programme affects the country where you are located.?> </p>
<? if($ttp) { ?>
-<p><?=_If you want to ask for TTP verifications fill out the missing data and send the request to support@cacert.org to start the process. SomeCA will then inform you about the next steps.?></p>
+<p><?=_If you want to ask for TTP verifications fill out the missing data to start the process. SomeCA will then inform you about the next steps.?></p>
<?=$form?>
<? } ?>
<? if($topup) { ?>
-<p><?=_As you have already got 2 TTP verifications you can only take part in the TTP TOPUP programme. If you want to ask for the TTP TOPUP programme use the submit button to send the request to support@cacert.org to start the process. SomeCA will then inform you about the next steps.?></p>
+<p><?=_As you have already got 2 TTP verifications you can only take part in the TTP TOPUP programme. If you want to ask for the TTP TOPUP programme use the submit button to start the process. SomeCA will then inform you about the next steps.?></p>
<form method="post" action="ttp">
<input type="submit" name="ttptopup" value="<?=_I need a TTP TOPUP?>">
</form>
return apiHostName + securePort;
}
+ public static String getLinkHostNamePort() {
+ return "link." + getSuffix() + port;
+ }
+
+ public static String getLinkHostNamePortSecure() {
+ return "link." + getSuffix() + securePort;
+ }
+
public static int getSecurePort() {
if (secureBindPort != null && !secureBindPort.isEmpty()) {
if (secureBindPort.equals("stdin")) {
}
public static String getSupportMailAddress() {
- return "support@" + ServerConstants.getWwwHostName().replaceFirst("^www\\.", "");
+ return "support@" + getSuffix();
}
public static String getBoardMailAddress() {
- return "board@" + ServerConstants.getWwwHostName().replaceFirst("^www\\.", "");
+ return "board@" + getSuffix();
}
public static String getQuizMailAddress() {
- return "quiz@" + ServerConstants.getWwwHostName().replaceFirst("^www\\.", "");
+ return "quiz@" + getSuffix();
}
public static String getQuizAdminMailAddress() {
- return "quiz-admin@" + ServerConstants.getWwwHostName().replaceFirst("^www\\.", "");
+ return "quiz-admin@" + getSuffix();
}
}