summaryrefslogtreecommitdiffstats
path: root/template/en/default/mfa
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-09-23 05:54:41 +0200
committerByron Jones <glob@mozilla.com>2015-09-23 05:54:41 +0200
commit043c7523acd6af5288191b15f746fc360b73ab40 (patch)
tree536980970ca7ae13ce29d4cf9e9f69fb0669a972 /template/en/default/mfa
parent2e425408eeb1065eacb4bcded2cc88d05a689e1c (diff)
downloadbugzilla-043c7523acd6af5288191b15f746fc360b73ab40.tar.gz
bugzilla-043c7523acd6af5288191b15f746fc360b73ab40.tar.xz
Bug 1199087 - extend 2fa protection beyond login
Diffstat (limited to 'template/en/default/mfa')
-rw-r--r--template/en/default/mfa/protected.html.tmpl12
-rw-r--r--template/en/default/mfa/totp/verify.html.tmpl18
2 files changed, 22 insertions, 8 deletions
diff --git a/template/en/default/mfa/protected.html.tmpl b/template/en/default/mfa/protected.html.tmpl
new file mode 100644
index 000000000..da945244d
--- /dev/null
+++ b/template/en/default/mfa/protected.html.tmpl
@@ -0,0 +1,12 @@
+[%# This Source Code Form is subject to the terms of the Mozilla Public
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ #
+ # This Source Code Form is "Incompatible With Secondary Licenses", as
+ # defined by the Mozilla Public License, v. 2.0.
+ #%]
+
+[% RETURN UNLESS user.mfa %]
+
+<img src="images/mfa.png" class="mfa-protected" width="16" height="16"
+ alt="2FA" title="Protected by Two-factor Authentication">
diff --git a/template/en/default/mfa/totp/verify.html.tmpl b/template/en/default/mfa/totp/verify.html.tmpl
index 3ff720d62..e61ee3866 100644
--- a/template/en/default/mfa/totp/verify.html.tmpl
+++ b/template/en/default/mfa/totp/verify.html.tmpl
@@ -13,17 +13,19 @@
<h1>Account Verification</h1>
<p>
+ <b>[% reason FILTER html %]</b> requires verification.<br>
Please enter your verification code from your TOTP application:
</p>
-<form method="POST" action="token.cgi">
-<input type="hidden" name="a" value="mfa">
-<input type="hidden" name="t" value="[% token FILTER html %]">
-<input type="text" name="code" id="code"
- placeholder="123456" maxlength="6" pattern="\d{6}" size="10"
- autocomplete="off" required autofocus><br>
-<br>
-<input type="submit" value="Submit">
+<form method="POST" action="[% postback.action FILTER none %]">
+ [% FOREACH field IN postback.fields.keys %]
+ <input type="hidden" name="[% field FILTER html %]" value="[% postback.fields.item(field) FILTER html %]">
+ [% END %]
+ <input type="text" name="code" id="code"
+ placeholder="123456" maxlength="6" pattern="\d{6}" size="10"
+ autocomplete="off" required autofocus><br>
+ <br>
+ <input type="submit" value="Submit">
</form>
[% INCLUDE global/footer.html.tmpl %]