Closed Bug 1983289 Opened 7 months ago Closed 7 months ago

reddit blocking access to threads with error about "blocked by network security"

Categories

(Web Compatibility :: Site Reports, defect)

defect

Tracking

(firefox143 verified)

VERIFIED FIXED
Tracking Status
firefox143 --- verified

People

(Reporter: jesup, Unassigned, NeedInfo)

References

()

Details

Attachments

(1 file)

https://webcompat.com/issues/171923
https://www.reddit.com/r/firefox/comments/1mqmsv5/your_request_has_been_blocked_by_network_security/

If you browse to https://www.reddit.com/r/firefox/comments/1mqmsv5/your_request_has_been_blocked_by_network_security/ in a private window, you'll get a red warning banner: "Your request has been blocked by network security. Please try to login with your Reddit account."

Note that logging in doesn't change this.

From a non-PB window, in a new profile, you (likely) will get the same message. An existing profile logged into reddit (usually) won't get it.

Switching to old.reddit.com makes it go away.

I suspect that preload may be related.

The body contains this (edit: original body contains preload):

<link rel="preload" href="/svc/shreddit/comments/r/firefox/t3_1mqmsv5?render-mode=partial&amp;seeker-session=true" as="fetch" /> <link rel="preload" href="/svc/shreddit/pdp-right-rail/related/firefox/t3_1mqmsv5?render-mode=partial&amp;seeker-session=true" as="fetch" />

If I create an extension that does str = str.replaceAll(/<link rel="preload" href="/g, "$&https://example.com/");, then the content loads fine.

If I drop the preload tag, str = str.replaceAll("preload", "perload");, then some error in Reddit happens and the page does not load (but there is no red banner either).

Attached file reddit-body-mod.zip

This extension fixes Reddit for me. See background.js

(Visit about:debugging to load it)

Note that if I navigate to a thread in reddit, say from r/firefox, it works. If I take the same URL and paste it into the URLBar, I get the network error every time (testing in Private Browsing window, not logged int)

(In reply to Randell Jesup [:jesup] (needinfo me) from comment #3)

Note that if I navigate to a thread in reddit, say from r/firefox, it works. If I take the same URL and paste it into the URLBar, I get the network error every time (testing in Private Browsing window, not logged int)

The "navigate" by clicking is not a full page navigation, but JavaScript + history.pushState.

Even after navigating, if you then reload the page, the bug re-occurs. I strongly suspect the preload tag in the HTML source of the document, because manually cutting it out (with an extension - comment 1 & comment 2) causes the bug to disappear.

about:logging with the following preset (Network + Fetch + PreloadService):
https://share.firefox.dev/3Jjc52Q

(MOZ_LOG=timestamp,sync,nsHttp:5,cache2:5,nsSocketTransport:5,nsHostResolver:5,EarlyHint:5,Fetch:5,PreloadService:5 )

Just chiming in from the Reddit traffic team to say we're aware of this issue and are actively looking at it from our side.

It seems if I set network.http.http2.enabled to false in about:config the problem goes away.
So it seems to be something specific to our H2 implementation.

Reddit also announced that they are working on it at https://www.reddit.com/r/RedditBugs/comments/1mr2w7f/webfirefox_some_firefox_users_are_reporting_a/

[Web/Firefox] Some Firefox users are reporting a "blocked by network security" error

Investigating
Report(s)


Hey folks - we're aware that some of you are receiving a "blocked by network security" error across some pages on www.reddit.com. Just confirming that we're actively investigating the issue, and I'll post updates here as we get closer to resolving things.

I and another colleague cannot reproduce this issue any more.

Brian, could you confirm that you have rolled out a fix?

Do you also know the cause of the issue, and is this something that Firefox could/should investigate/fix?

Flags: needinfo?(brian)

Reddit has rolled out a mitigation while we investigate a permanent solution.

I don't think there's any action needed from Firefox on this.

Status: NEW → RESOLVED
Closed: 7 months ago
Flags: needinfo?(brian)
Resolution: --- → FIXED

Hi Brian,

Thank you for the quick fix.
When possible, we'd appreciate it if you could let us know what caused the problem. I'm curious whether other websites might also be affected by it, and whether Firefox needs to take steps to mitigate such issues.
Thanks!

Flags: needinfo?(brian.landers)

I'm witnessing the same issue again: Reddit posts cannot be loaded, unless I trigger a navigation from a subreddit to a post. E.g. click on a post in /r/firefox and it loads, reload the page and it fails again with "Your request has been blocked by network security. Please try to login with your Reddit account."

^ The renewed instance of the issue appears to have been resolved.

Verified, the issue no longer reproduces.

Tested with:

  • Browser / Version: Firefox 143.0-candidate build 1
  • Operating System: MacOS Sequoia 15.6.1
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: