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

Privacy plugin can't handle a large number of external assets #5127

Closed
4 tasks done
jonaharagon opened this issue Mar 1, 2023 · 2 comments
Closed
4 tasks done

Privacy plugin can't handle a large number of external assets #5127

jonaharagon opened this issue Mar 1, 2023 · 2 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@jonaharagon
Copy link
Sponsor

jonaharagon commented Mar 1, 2023

Context

privacyguides/privacyguides.org#2063 (comment)

Bug description

On pages with a lot of external resources or links, the privacy plugin does not download all external assets. This is easily reproduced by just repeating the same emoji a bunch of times:

image

This is not only dependent on the number of external assets, any regular links to external sites also break external assets that come after them in the document:

Screenshot 2023-03-01 at 17 21 58@2x

Related links

Reproduction

Archive.zip

Steps to reproduce

  1. Enable the privacy plugin
  2. Load a large number of external images/assets (can be identical)

Browser

No response

Before submitting

@squidfunk
Copy link
Owner

Thanks for reporting and the excellent reproduction. Fixed in 7e19ae71f. In fact, it was no concurrency issues as initially suspected. The problem was that the flags passed to re.sub where interpreted as a maximum number of replacements, not as flags, since count is the first parameter in order. This lead to a maximum number of 40 replacements, as I counted.

@squidfunk squidfunk added bug Issue reports a bug resolved Issue is resolved, yet unreleased if open labels Mar 2, 2023
@squidfunk
Copy link
Owner

Released as part of 9.1.0+insiders-4.32.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

2 participants