Skip to content

Commit f60fe90

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

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
@@ -470,18 +470,18 @@ mark
470470
background: $passphrase_masked_color
471471
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%)
472472

473-
#codename-reminder
473+
#passphrase-reminder
474474
font-size: 18px
475475
color: $heading_alt_color
476476

477-
#codename-show-checkbox
477+
#passphrase-show-checkbox
478478
position: absolute
479479
@include ltr
480480
left: -999rem
481481
@include rtl
482482
right: -999rem
483483

484-
&~ #codename-show
484+
&~ #passphrase-show
485485
font-size: 11px
486486
line-height: 14px
487487
margin-top: -2px
@@ -498,7 +498,7 @@ mark
498498
border-color: $checkbox_hover_border
499499
box-shadow: inset 0 0 0 1px $checkbox_hover_border_inside
500500

501-
@mixin codename-show-checkbox
501+
@mixin passphrase-show-checkbox
502502
content: ""
503503
background: $body_bg
504504
display: block
@@ -508,10 +508,10 @@ mark
508508

509509
&::before
510510
@include ltr
511-
@include codename-show-checkbox
511+
@include passphrase-show-checkbox
512512
&::after
513513
@include rtl
514-
@include codename-show-checkbox
514+
@include passphrase-show-checkbox
515515

516516
&::before
517517
@include ltr
@@ -522,7 +522,7 @@ mark
522522
margin-left: 12px
523523
float: right
524524

525-
&:focus-visible ~ #codename-show
525+
&:focus-visible ~ #passphrase-show
526526
box-shadow: 0 0 0 3px $focus_shadow
527527

528528
&:checked ~ mark > span
@@ -540,14 +540,14 @@ mark
540540
height: 13px
541541
border: 0
542542

543-
&:checked ~ #codename-show::before
543+
&:checked ~ #passphrase-show::before
544544
@include ltr
545545
@include checked
546-
&:checked ~ #codename-show::after
546+
&:checked ~ #passphrase-show::after
547547
@include rtl
548548
@include checked
549549

550-
#codename-show
550+
#passphrase-show
551551
display: block
552552

553553
#upload
@@ -949,7 +949,7 @@ section[aria-labelledby="submit-heading"]
949949
section[aria-labelledby="welcome-heading"]
950950
margin-top: 50px
951951

952-
section[aria-labelledby="codename-reminder"] + section h2
952+
section[aria-labelledby="passphrase-reminder"] + section h2
953953
padding-top: 26px
954954

955955
#source-lookup main, #source-logout main
@@ -1140,7 +1140,7 @@ section[aria-labelledby="codename-reminder"] + section h2
11401140
.info
11411141
padding: 9px
11421142

1143-
#flashed + section, #codename-hint + section:not(#flashed)
1143+
#flashed + section, #passphrase-hint + section:not(#flashed)
11441144
margin-top: 3em
11451145

11461146
#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
@@ -69,7 +69,7 @@ <h2 id="first-submission-heading">{{ gettext('First submission') }}</h2>
6969

7070
<section id="return-visit" aria-labelledby="return-visit-heading">
7171
<h2 id="return-visit-heading">{{ gettext('Return visit') }}</h2>
72-
<p>{{ gettext('Already have a codename? Check for replies or submit something new.') }}</p>
72+
<p>{{ gettext('Already have a passphrase? Check for replies or submit something new.') }}</p>
7373
<a href="{{ url_for('main.login') }}" class="btn secondary"
7474
aria-label="{{ gettext('Log In') }}">
7575
{{ 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)