Skip to content

Commit fb12461

Browse files
Replaced "codename" with "passphrase"
- updated interface strings - for consistency, updated CSS names as well - updated session key name
1 parent 54fc832 commit fb12461

File tree

7 files changed

+30
-30
lines changed

7 files changed

+30
-30
lines changed

securedrop/sass/source.sass

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -458,18 +458,18 @@ mark
458458
background: $passphrase_masked_color
459459
clip-path: polygon(0% 0%, 0% 100%, 20% 100%, 20% 0%, 23% 0%, 23% 100%, 32% 100%, 32% 0%, 35% 0%, 35% 100%, 42% 100%, 42% 0%, 45% 0%, 45% 100%, 64% 100%, 64% 0%, 67% 0%, 67% 100%, 74% 100%, 74% 0%, 77% 0%, 77% 100%, 90% 100%, 90% 0%, 93% 0%, 93% 100%, 100% 100%, 100% 0%)
460460

461-
#codename-reminder
461+
#passphrase-reminder
462462
font-size: 18px
463463
color: $heading_alt_color
464464

465-
#codename-show-checkbox
465+
#passphrase-show-checkbox
466466
position: absolute
467467
@include ltr
468468
left: -999rem
469469
@include rtl
470470
right: -999rem
471471

472-
&~ #codename-show
472+
&~ #passphrase-show
473473
font-size: 11px
474474
line-height: 14px
475475
margin-top: -2px
@@ -486,7 +486,7 @@ mark
486486
border-color: $checkbox_hover_border
487487
box-shadow: inset 0 0 0 1px $checkbox_hover_border_inside
488488

489-
@mixin codename-show-checkbox
489+
@mixin passphrase-show-checkbox
490490
content: ""
491491
background: $body_bg
492492
display: block
@@ -496,10 +496,10 @@ mark
496496

497497
&::before
498498
@include ltr
499-
@include codename-show-checkbox
499+
@include passphrase-show-checkbox
500500
&::after
501501
@include rtl
502-
@include codename-show-checkbox
502+
@include passphrase-show-checkbox
503503

504504
&::before
505505
@include ltr
@@ -510,7 +510,7 @@ mark
510510
margin-left: 12px
511511
float: right
512512

513-
&:focus-visible ~ #codename-show
513+
&:focus-visible ~ #passphrase-show
514514
box-shadow: 0 0 0 3px $focus_shadow
515515

516516
&:checked ~ mark > span
@@ -528,14 +528,14 @@ mark
528528
height: 13px
529529
border: 0
530530

531-
&:checked ~ #codename-show::before
531+
&:checked ~ #passphrase-show::before
532532
@include ltr
533533
@include checked
534-
&:checked ~ #codename-show::after
534+
&:checked ~ #passphrase-show::after
535535
@include rtl
536536
@include checked
537537

538-
#codename-show
538+
#passphrase-show
539539
display: block
540540

541541
#upload
@@ -937,7 +937,7 @@ section[aria-labelledby="submit-heading"]
937937
section[aria-labelledby="welcome-heading"]
938938
margin-top: 50px
939939

940-
section[aria-labelledby="codename-reminder"] + section h2
940+
section[aria-labelledby="passphrase-reminder"] + section h2
941941
padding-top: 26px
942942

943943
#source-lookup main, #source-logout main
@@ -1128,7 +1128,7 @@ section[aria-labelledby="codename-reminder"] + section h2
11281128
.info
11291129
padding: 9px
11301130

1131-
#flashed + section, #codename-hint + section:not(#flashed)
1131+
#flashed + section, #passphrase-hint + section:not(#flashed)
11321132
margin-top: 3em
11331133

11341134
#source-lookup nav + section:not(#flashed)

securedrop/source_app/session_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class SessionManager:
3030
"""Helper to manage the user's session cookie accessible via flask.session."""
3131

3232
# The keys in flask.session for the user's passphrase and expiration date
33-
_SESSION_COOKIE_KEY_FOR_CODENAME = "codename"
33+
_SESSION_COOKIE_KEY_FOR_CODENAME = "passphrase"
3434
_SESSION_COOKIE_KEY_FOR_EXPIRATION_DATE = "expires"
3535

3636
@classmethod

securedrop/source_templates/error.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ <h2>{{ gettext('Server error') }}</h2>
44

55
<p>{{ gettext('Sorry, the website encountered an error and was unable to complete your request.') }}</p>
66

7-
<p><a href="{{ url_for('main.login') }}">{{ gettext('Look up a codename...') }}</a></p>
7+
<p><a href="{{ url_for('main.login') }}">{{ gettext('Look up a passphrase...') }}</a></p>
88
{% endblock %}

securedrop/source_templates/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ <h2 id="first-submission-heading">{{ gettext('First submission') }}</h2>
7171

7272
<section id="return-visit" aria-labelledby="return-visit-heading">
7373
<h2 id="return-visit-heading">{{ gettext('Return visit') }}</h2>
74-
<p>{{ gettext('Already have a codename? Check for replies or submit something new.') }}</p>
74+
<p>{{ gettext('Already have a passphrase? Check for replies or submit something new.') }}</p>
7575
<a href="{{ url_for('main.login') }}" class="btn secondary"
7676
aria-label="{{ gettext('Log In') }}">
7777
{{ gettext('LOG IN') }}

securedrop/source_templates/lookup.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ <h2 id="welcome-heading">{{ gettext('Welcome!') }}</h2>
2020
<section aria-labelledby="keep-in-touch-heading">
2121
<h2 id="keep-in-touch-heading">{{ gettext('Keep In Touch') }}</h2>
2222

23-
<p id="codename-explanation">{{ gettext('A <em>codename</em> in SecureDrop functions as both your username and your password.') }}</p>
24-
<p>{{ gettext('You will need this codename to log into our SecureDrop later:') }}</p>
23+
<p id="passphrase-explanation">{{ gettext('A <em>passphrase</em> in SecureDrop functions as both your username and your password.') }}</p>
24+
<p>{{ gettext('You will need this passphrase to log into our SecureDrop later:') }}</p>
2525

26-
{{ utils.codename(new_user_passphrase) }}
26+
{{ utils.passphrase(new_user_passphrase) }}
2727

28-
<ul id="codename-instructions">
28+
<ul id="passphrase-instructions">
2929
<li>{{ gettext('<strong>Keep it secret.</strong> Do not share it with anyone.') }}</li>
3030
<li>{{ gettext('<strong>Keep it safe.</strong> There is no account recovery option.') }}</li>
3131
</ul>
@@ -38,7 +38,7 @@ <h2 id="replies-heading">{{ gettext('Replies') }}</h2>
3838
<div id="replies">
3939
{% if replies %}
4040
<p class="info">
41-
{{ gettext("You have received a reply. To protect your identity in the unlikely event someone learns your codename, please delete all replies when you're done with them. This also lets us know that you are aware of our reply. You can respond by submitting new files and messages above.") }}
41+
{{ gettext("You have received a reply. To protect your identity in the unlikely event someone learns your passphrase, please delete all replies when you're done with them. This also lets us know that you are aware of our reply. You can respond by submitting new files and messages above.") }}
4242
</p>
4343
{% for reply in replies %}
4444
{%- set timestamp = utils.relative_time(reply.date) -%}

securedrop/source_templates/notfound.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ <h2>{{ gettext('Page not found') }}</h2>
44

55
<p id="page-not-found">{{ gettext("Sorry, we couldn't locate what you requested.") }}</p>
66

7-
<p><a href="{{ url_for('main.login') }}">{{ gettext('Look up a codename...') }}</a></p>
7+
<p><a href="{{ url_for('main.login') }}">{{ gettext('Look up a passphrase...') }}</a></p>
88
{% endblock %}

securedrop/source_templates/utils.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
datetime="{{ date|html_datetime_format }}">{{ date|rel_datetime_format(relative=True) }}</time>
44
{%- endmacro -%}
55

6-
{%- macro codename(codename, new=True) -%}
7-
<div aria-labelledby="codename-heading">
8-
<h3 id="codename-heading" hidden>{{ gettext('Codename') }}</h3>
6+
{%- macro passphrase(passphrase, new=True) -%}
7+
<div aria-labelledby="passphrase-heading">
8+
<h3 id="passphrase-heading" hidden>{{ gettext('Passphrase') }}</h3>
99

10-
<input id="codename-show-checkbox" type="checkbox" role="button"{% if new %} checked {% endif -%}
11-
aria-label="{{ gettext('Show Codename') }}" aria-controls="codename">
10+
<input id="passphrase-show-checkbox" type="checkbox" role="button"{% if new %} checked {% endif -%}
11+
aria-label="{{ gettext('Show Passphrase') }}" aria-controls="passphrase">
1212

13-
<mark id="codename" lang="en-US" dir="ltr"
14-
aria-describedby="codename-instructions codename-explanation"><span>{{ codename }}</span></mark>
13+
<mark id="passphrase" lang="en-US" dir="ltr"
14+
aria-describedby="passphrase-instructions passphrase-explanation"><span>{{ passphrase }}</span></mark>
1515

16-
<label for="codename-show-checkbox" id="codename-show"
16+
<label for="passphrase-show-checkbox" id="passphrase-show"
1717
aria-hidden="true">
18-
{{ gettext('Show Codename') }}
18+
{{ gettext('Show Passphrase') }}
1919
</label>
2020

2121
</div>

0 commit comments

Comments
 (0)