Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update source TB logout instructions #1522

Merged
merged 1 commit into from
Jan 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/images/manual/logout-notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/manual/restart-tor-browser.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/manual/source-step1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/manual/source-step2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 9 additions & 5 deletions securedrop/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,12 +391,16 @@ def login():
def logout():
if logged_in():
session.clear()
tor_msg = Markup("""<strong>Important:</strong> Thank you for logging out.
tor_msg = Markup("""<strong>Important:</strong><br>
Thank you for logging out!<br>
Please fully end your session by restarting
Tor Browser: Click the <img src='static/i/toronion.png'
alt='Tor icon' /> Tor onion icon in the toolbar above,
click <strong> New Identity</strong> and click
<strong>Yes</strong> in the dialog box that appears.""")
Tor Browser:<br>
1. Click the
<img src='static/i/toronion.png' alt='Tor icon' />
Tor onion icon in the toolbar above.<br>
2. Click <strong> New Identity</strong>.<br>
3. Click <strong>Yes</strong> in the dialog box
that appears.""")
flash(tor_msg, "error")

return redirect(url_for('index'))
Expand Down
6 changes: 3 additions & 3 deletions securedrop/source_templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{% endassets %}
</head>
<body>
<div class="warning"><strong>We recommend disabling JavaScript and turning the Security Slider to High to protect your anonymity:</strong> <a id="disable-js" href="/howto-disable-js">Learn how to disable it</a>, or ignore this warning to continue. <img id="warning-close" src="{{ url_for('static', filename='i/font-awesome/white/times.svg') }}" width="12px" height="12px"></div>
<div class="warning"><strong>We recommend turning the Security Slider to High to protect your anonymity:</strong> <a id="disable-js" href="/howto-disable-js">Learn how to disable it</a>, or ignore this warning to continue. <img id="warning-close" src="{{ url_for('static', filename='i/font-awesome/white/times.svg') }}" width="12px" height="12px"></div>

{% include 'banner_warning_flashed.html' %}

Expand Down Expand Up @@ -61,12 +61,12 @@ <h2>
Included here so the images can preload while the user is first
reading the page. Hidden by default. -->
<div class="bubble">
<p>You appear to be using the Tor Browser. You can disable Javascript and turn the Security Slider to High in 4 easy steps!</p>
<p>You appear to be using the Tor Browser. You can turn the Security Slider to High in 4 easy steps!</p>
<ol>
<li>Click the <img src="static/i/toronion.png" alt="Tor icon" />Tor icon in the toolbar above</li>
<li>Click <strong>Privacy and Security Settings</strong></li>
<li>Turn the Slider to <strong>High</strong></li>
<li>If the page does not refresh automatically, <a href="/">click here</a> to refresh the page</li>
<li>If the page does not refresh automatically, <a href="/">click here</a> to refresh the page</li>
</ol>

<p><a href="/howto-disable-js">Not using the Tor Browser Bundle?</a></p>
Expand Down
2 changes: 1 addition & 1 deletion securedrop/tests/functional/source_navigation_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ def _source_submits_a_message(self):
def _source_logs_out(self):
logout_button = self.driver.find_element_by_id('logout').click()
notification = self.driver.find_element_by_css_selector('p.error')
self.assertIn('Thank you for logging out.', notification.text)
self.assertIn('Thank you for logging out!', notification.text)
2 changes: 1 addition & 1 deletion securedrop/tests/test_unit_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def test_login_and_logout(self):
self.assertTrue(session['logged_in'])
resp = c.get('/logout', follow_redirects=True)
self.assertTrue(not session)
self.assertIn('Thank you for logging out.', resp.data)
self.assertIn('Thank you for logging out!', resp.data)

def test_login_with_whitespace(self):
"""Test that codenames with leading or trailing whitespace still work"""
Expand Down