Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

RFC: Increase Nokogiri::Gumbo::DEFAULT_MAX_ERRORS to a positive number #3245

Closed
flavorjones opened this issue Jun 21, 2024 · 2 comments
Closed

Comments

@flavorjones
Copy link
Member

I'm not totally sure why this was initially set to 0 but I think it would be useful to:

  • set it to a finite positive number, so some errors are recorded from the parser
  • if the parser hits the max, then the last error should be something like There are more errors which were not recorded. Please set :max_errors to a larger number.

I would consider eventually setting the default to -1 to capture all errors, but we should probably think about whether this is something that could be abused by an attacker via untrusted content.

@stevecheckoway
Copy link
Contributor

It's a holdover from Nokogumbo. See rubys/nokogumbo#78 for some discussion and rubys/nokogumbo#65 for the initial rationale.

@flavorjones
Copy link
Member Author

Fascinating threads, thank you. I guess I'll think about this a bit more.

@flavorjones flavorjones changed the title Increase Nokogiri::Gumbo::DEFAULT_MAX_ERRORS to a positive number RFC: Increase Nokogiri::Gumbo::DEFAULT_MAX_ERRORS to a positive number Jun 23, 2024
@sparklemotion sparklemotion locked and limited conversation to collaborators Jun 23, 2024
@flavorjones flavorjones converted this issue into discussion #3248 Jun 23, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

2 participants