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

[Robots.txt] Path analyse bug with url-decode if allow/disallow path contains escaped wild-card characters #408

Conversation

sebastian-nagel
Copy link
Contributor

(fixes #195)

  • add unit tests to catch the issue
  • percent-encode allow/disallow paths and URL paths before/during rule matching
  • decode characters where necessary
  • match paths containing * or $: percent-encoded in rules because of the special meaning. See also Special characters * and $ not matched in URI google/robotstxt#57 for clarification about the correct behavior.
  • minor changes in BasicURLNormalizer to be able to use the provided path encoding/decoding methods

…contains escaped wild-card characters

- properly percent-encode allow/disallow paths
  and URL paths during rule matching
- decode characters where necessary
- add unit tests
…contains escaped wild-card characters

- fix path matching for paths containing `*` or `$`
@sebastian-nagel sebastian-nagel added this to the 1.4 milestone May 12, 2023
@sebastian-nagel sebastian-nagel merged commit 962787f into crawler-commons:master May 23, 2023
2 checks passed
@sebastian-nagel
Copy link
Contributor Author

Thanks, @rzo1!

sebastian-nagel added a commit that referenced this pull request Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Robots.txt] Path analyse bug with url-decode if allow/disallow path contains escaped wild-card characters
2 participants