-
Notifications
You must be signed in to change notification settings - Fork 697
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
Updated tor2web check to return a 403 status on success #6300
Conversation
7ef6ef1
to
c4c4e90
Compare
The body and header text both need some work, imho. 1. Active voice. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed that "strongly advise" doesn't cut it here, since we're actually fully blocking access to SDs if we see Tor2Web is being used.
In the commit message and PR title, you described this as a "redirect", but it's not actually a redirect, it just overrides the current page. I think actually doing a redirect to an endpoint like /tor2web
would be nicer if we end up implementing a proxy/URL check in JavaScript.
I agree with Nina and Kunal that, given that the behavior change is from warning to blocking, we'll need to update the page a bit more to make that explicit. It may also be worth making it even clearer that, at this point, the user has effectively disclosed their IP address to the Tor2web operator (and apparently Google Analytics and ad providers for many of them). In other words, depending on their behavior or threat model, it may no longer be safe for them to make a submission at all. I realize most of the page pre-dates the PR, but I think it'd be worth workshopping the entire page content a bit in a GDoc or Figma, assuming we can actually reliably detect Tor2web gateways in one way or another. |
I'm down to make the changes mentioned - afterwards if we do want to workshop it I'd prefer to get that scheduled sooner rather than later, in the interest of getting this change out the door in a reasonable timeframe. |
@legoktm re: redirect word, that's just sloppy terminology on my part, but I do think that a 403 is appropriate given that the intent is to deny access. Will update the PR. Also, the original |
Not down with the "public or private adversaries" bit on further reflection, as it's probably best not to overload sources with domain-specific terminology. Also, the current text does speak accurately, tho not completely, to the specific adversaries a source in this situation would have to worry about. |
Could say "(your employer, your government, your Internet provider)" which doesn't strike me as overly unwieldy. But I think after you have a version up you're happy with, maybe we can have a quick huddle on Wednesday or Thursday to futz a bit more. |
c4c4e90
to
1787f47
Compare
OK, new version up.
|
Technically LGTM, not giving it the green check in case people have other wording concerns. One thing I was worried about was that the proxy would try to rewrite the onion URL, but in my testing it only does so if it's in a |
1787f47
to
b974422
Compare
tweaked the language a bit based on the discussion in #6293 - now looks like this: |
I've proposed a slight reword of the page here: Proposed changes in a nutshell:
Please feel free to futz further in the pad or challenge any of those tweaks :) |
bae90c2
to
c0186f0
Compare
LGTM! Thanks for patiently poking at it together. |
Codecov Report
@@ Coverage Diff @@
## develop #6300 +/- ##
===========================================
+ Coverage 84.07% 84.09% +0.01%
===========================================
Files 60 60
Lines 4208 4213 +5
Branches 508 509 +1
===========================================
+ Hits 3538 3543 +5
Misses 549 549
Partials 121 121
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed test plan, LGTM. If there are still concerns with the new wording, it can be adjusted in a follow-up.
PR #6300 already removed the logic in the app, this removes the equivalent bits in templates
PR #6300 already removed the logic in the app, this removes the equivalent bits in templates
Status
Ready for review
Description of Changes
Fixes #6291 .
Changes the SI behaviour when a tor2web request is detected. Previously, the application would display a warning flash message on the page, with a link to
info/tor2web_warning
summarizing the risks of using tor2web. Now, the application will respond with the warning page directly, served with a 403 error status.The warning page now also contains the correct onion URL for the instance, and text has been updated:
Note that by itself this PR will not improve detection of tor2web proxies, preserving the current logic of checking for the
X-tor2web
header (which is rarely present anymore).Testing
make dev-tor
docker exec -it securedrop-dev-0 bash
and add a file/var/lib/securedrop/source_v3_url
containing a single line with a validly-formatted v3 onion URL (<56chars>.onion
, no protocol or slashes)localhost:8080
or over Tor) and that basic functionality works with no tor2web warnings or redirects/metadata
endpointDeployment
n/a
Checklist
If you made changes to the server application code:
make lint
) and tests (make test
) pass in the development containerIf you made non-trivial code changes:
Choose one of the following: