Repository navigation
fix(lab-ops-hub): return the ASCII dot for literal UTS-46 separator spellings in the container validator (#660) - #664
Merged
Conversation
…pellings in the container validator (#660)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 3
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #660
Problem
PR #657 fixed #647 for percent-encoded root-dot spellings, but literal UTS-46 label-separator spellings (U+3002
。, U+FF0E., U+FF61。) still returned the fullwidth form from the container validator:http://example.com。/→ containerhttp://example.com。/, Workerhttp://example.com./http://example.com。:8080/,http://user@example.com。/same patternhttp://example。com/→ container verbatim, Workerhttp://example.com/validate_crawl_urljudges the UTS-46-mapped host (separators translated to.), but the non-percent return path returnedrawverbatim, so the mapped dot never reached the returned URL. The same target was therefore recorded under two different URLs depending on spelling, defeating cross-crawler dedup/comparison — exactly the #647 harm, surviving for the literal spellings.Solution
has_literal_separatoron the (possibly percent-decoded) host before the UTS-46 mapping translates the separators away.percent_decoded or has_literal_separator, exactly as it already did for percent-decoded hosts. That re-attaches the root dot (host + "." if has_root_dot) and carries interior dots in the mapped host itself.münchen。deintest_refuses_mapped_spellings_of_blocked_targets) to expectmünchen.de— the U-label is kept, only the separator changes (lab-ops-hub: container validator returns the raw U-label host for IDN targets — Worker returns the punycode A-label form it judged #659 covers the A-label form).Verification
36a592f3: all issue spellings returned the fullwidth form; blocked spellings (localhost。,127.0.0.1。) were already refused for the right reason.app.pyreverted, exactly the new Python test and the updatedmünchen。decontrol fail, both with the fullwidth-form divergence.ruff formatclean.git grep validate_crawl_url/validateCrawlUrlfinds no copy in the opencode/openchamber/nix clones.Need help on this PR? Tag
@codesmith-botwith what you need.