-
Notifications
You must be signed in to change notification settings - Fork 693
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from freedomofpress/idor-2fa
Don't allow admins to look up arbitrary users' TOTP secrets via the web
- Loading branch information
Showing
12 changed files
with
370 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
securedrop/journalist_templates/account_new_two_factor_hotp.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{% extends "base.html" %} | ||
|
||
{% block tab_title %}{{ gettext('Enable YubiKey (OATH-HOTP)') }}{% endblock %} | ||
|
||
{% block body %} | ||
<h1>{{ gettext('Enable YubiKey (OATH-HOTP)') }}</h1> | ||
<p>{{ gettext('Once you have configured your YubiKey, enter the 6-digit verification code below:') }}</p> | ||
<form id="check-token" method="post" action="{{url_for('account.new_two_factor_hotp')}}"> | ||
<input name="csrf_token" type="hidden" value="{{ csrf_token() }}"> | ||
<label for="token">{{ gettext('Verification code') }}</label> | ||
<input name="token" id="token" type="text" placeholder="123456"> | ||
<button type="submit" aria-label="{{ gettext('Submit verification code') }}">{{ gettext('SUBMIT') }}</button> | ||
</form> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
securedrop/journalist_templates/admin_new_user_two_factor_hotp.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{% extends "base.html" %} | ||
|
||
{% block tab_title %}{{ gettext('Enable YubiKey (OATH-HOTP)') }}{% endblock %} | ||
|
||
{% block body %} | ||
<h1>{{ gettext('Enable YubiKey (OATH-HOTP)') }}</h1> | ||
<p>{{ gettext('Once you have configured your YubiKey, enter the 6-digit code below:') }}</p> | ||
<form id="check-token" method="post" action="{{url_for('admin.new_user_two_factor_hotp')}}"> | ||
<input name="csrf_token" type="hidden" value="{{ csrf_token() }}"> | ||
<input name="uid" type="hidden" value="{{ user.id }}"> | ||
<label for="token">{{ gettext('Verification code') }}</label> | ||
<input name="token" id="token" type="text" placeholder="123456"> | ||
<button type="submit" aria-label="{{ gettext('Submit verification code') }}">{{ gettext('SUBMIT') }}</button> | ||
</form> | ||
{% endblock %} |
Oops, something went wrong.