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 dependency adblock-rs to v0.9.1 #217

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 25, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
adblock-rs 0.8.12 -> 0.9.1 age adoption passing confidence

Release Notes

brave/adblock-rust (adblock-rs)

v0.9.1

Compare Source

v0.9.0

Compare Source


Configuration

📅 Schedule: Branch creation - "* 0-4 * * 3" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/adblock-rs-0.x branch 2 times, most recently from a6844c3 to b175807 Compare October 1, 2024 15:16
Copy link

github-actions bot commented Oct 1, 2024

[puLL-Merge] - brave/[email protected]

Description

This PR implements several significant changes to the adblock-rust library, including updates to cosmetic filter handling, scriptlet resource management, and various other improvements and bugfixes. The changes aim to enhance the library's functionality, performance, and compatibility with different types of adblock filters.

Changes

Changes

  1. Cargo.toml and Cargo.lock:

    • Updated version to 0.9.0
    • Made serde_json a non-optional dependency
  2. src/content_blocking.rs:

    • Added support for procedural cosmetic filters
    • Improved error handling for content blocking rule creation
  3. src/cosmetic_filter_cache.rs:

    • Refactored cosmetic filter storage to support procedural filters
    • Introduced ProceduralOrActionFilter struct for complex filter representation
    • Updated UrlSpecificResources to include procedural actions
  4. src/engine.rs:

    • Updated scriptlet injection logic
  5. src/filters/cosmetic.rs:

    • Introduced CosmeticFilterOperator enum for representing different parts of cosmetic filters
    • Refactored CosmeticFilter struct to support procedural operators
    • Improved CSS selector validation and parsing
  6. src/filters/network.rs:

    • Minor refactoring of network filter checking logic
  7. src/resources/resource_storage.rs:

    • Implemented dependency resolution for scriptlet resources
    • Improved scriptlet resource retrieval and injection logic
    • Added support for function-style resources
  8. Various other files:

    • Updated tests to reflect new functionality
    • Minor refactoring and code cleanup

Possible Issues

  1. The changes to cosmetic filter handling and scriptlet resource management may introduce compatibility issues with existing filter lists or client implementations that rely on the previous behavior.

  2. The new procedural filter support might increase memory usage and processing time for certain types of filters.

Security Hotspots

  1. The implementation of procedural cosmetic filters introduces new ways to manipulate web page content. While this enhances blocking capabilities, it also increases the attack surface for potential malicious filter rules. Careful validation and sandboxing of these filters should be implemented on the client side.

  2. The new dependency resolution system for scriptlet resources could potentially be exploited to create circular dependencies or excessive resource loading. Proper checks should be in place to prevent such issues.

@renovate renovate bot changed the title Update dependency adblock-rs to v0.9.0 Update dependency adblock-rs to v0.9.1 Oct 7, 2024
Copy link

github-actions bot commented Oct 7, 2024

[puLL-Merge] - brave/[email protected]

Description

This PR updates the adblock-rust library to version 0.9.1, making significant changes to the handling of cosmetic filters and scriptlet resources. The main goals appear to be improving support for procedural cosmetic filters and enhancing the management of scriptlet dependencies.

Changes

Changes

  1. Cargo.toml and Cargo.lock:

    • Updated adblock version to 0.9.1
    • Made serde_json a non-optional dependency
  2. README.md:

    • Updated NodeJS example file extension from .js to .mjs
  3. src/content_blocking.rs:

    • Added support for procedural cosmetic filters
    • Updated CbRuleCreationFailure enum to include ProceduralCosmeticFiltersUnsupported
  4. src/cosmetic_filter_cache.rs:

    • Refactored UrlSpecificResources struct to use procedural_actions instead of separate fields for different actions
    • Updated CosmeticFilterCache to handle procedural filters
    • Improved handling of CSS selectors with escape sequences
  5. src/data_format/v0.rs:

    • Updated serialization and deserialization to support new filter structure
  6. src/engine.rs:

    • Updated test cases to reflect changes in scriptlet injection
  7. src/filters/cosmetic.rs:

    • Refactored CosmeticFilter struct to use Vec<CosmeticFilterOperator> for selectors
    • Added CosmeticFilterOperator enum to represent different parts of a cosmetic filter
    • Updated parsing and validation of cosmetic filters
  8. src/filters/network.rs:

    • Updated regex handling to use regex::bytes for improved performance
  9. src/resources/resource_storage.rs:

    • Improved scriptlet resource handling, including support for dependencies
    • Added get_scriptlet_resources method to handle multiple scriptlet injections
    • Updated permission handling for scriptlet resources

Possible Issues

  1. The changes to cosmetic filter handling may require updates to dependent projects that rely on the previous filter structure.
  2. The new procedural filter support might introduce performance overhead for simpler use cases.

Security Hotspots

  1. The changes to regex handling in network filters (using regex::bytes) should be carefully reviewed to ensure no security vulnerabilities are introduced.
  2. The new scriptlet dependency resolution system should be audited to prevent potential security issues related to circular dependencies or excessive resource loading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants