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

Fix #3354: Tor over SSH prompt should not be populated with invalid response #3357

Merged
merged 3 commits into from
May 3, 2018

Conversation

redshiftzero
Copy link
Contributor

Status

Ready for review

Description of Changes

Fixes #3354. Basically just changes the prompt in order to make minimal changes but still make clear to admins that:

  1. Tor is the recommended option and
  2. You are selecting Tor instead of LAN and vice versa (not both)

Testing

This is reverting to the existing behavior, but consider if this prompt could be clearer in any way (it's easy to make a string change now).

Deployment

No special issues

Checklist

If you made changes to securedrop-admin:

  • Linting and tests (make -C admin test) pass in the admin development container

@redshiftzero redshiftzero requested a review from emkll May 3, 2018 18:34
emkll
emkll previously approved these changes May 3, 2018
Copy link
Contributor

@emkll emkll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps being explicit in the wording that SSH is exposed over Tor xor Localnet by explicitly enumerating what is enabled/disabled might make the prompt clearer (see inline comment).
I don't have any strong objections to the wording as-is, and otherwise good to merge from my perspective, so I'll let @redshiftzero either merge as-is or rephrase the prompt as they see fit.

SiteConfig.ValidateSSH(),
self.sanitize_ssh_over_tor_or_lan],
u'Enable SSH over Tor instead of LAN (recommended). '
u'If you respond no, SSH will be available over LAN only',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enable SSH over Tor (recommended, disables SSH over LAN). If you respond no, SSH will be available over LAN (disables SSH over Tor)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK adopted a hybrid, I think this should be good 😇:

Enable SSH over Tor (recommended, disables SSH over LAN). If you respond no, SSH will be available over LAN only:

@codecov-io
Copy link

codecov-io commented May 3, 2018

Codecov Report

Merging #3357 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #3357   +/-   ##
========================================
  Coverage    85.81%   85.81%           
========================================
  Files           34       34           
  Lines         2157     2157           
  Branches       238      238           
========================================
  Hits          1851     1851           
  Misses         250      250           
  Partials        56       56

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 640f56f...61e7778. Read the comment docs.

This is a minimal change to make clear:

1. Tor is the recommended option.
2. Disabling Tor enables LAN and vice versa.
@redshiftzero redshiftzero force-pushed the no-fancy-tor-ssh-sdconfig branch from cad8b4e to 61e7778 Compare May 3, 2018 19:43
@emkll emkll mentioned this pull request May 3, 2018
21 tasks
@emkll emkll self-requested a review May 3, 2018 20:14
Copy link
Contributor

@emkll emkll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@emkll emkll merged commit d8205f9 into develop May 3, 2018
@emkll emkll deleted the no-fancy-tor-ssh-sdconfig branch May 3, 2018 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants