René's URL Explorer Experiment


Title: lab-ops-hub: container validator's overlong-name check counts characters, not IDNA-encoded length — IDN labels/names over the RFC 1035 limits still pass in Python while the Worker refuses them · Issue #517 · developing-today/code · GitHub

Open Graph Title: lab-ops-hub: container validator's overlong-name check counts characters, not IDNA-encoded length — IDN labels/names over the RFC 1035 limits still pass in Python while the Worker refuses them · Issue #517 · developing-today/code

X Title: lab-ops-hub: container validator's overlong-name check counts characters, not IDNA-encoded length — IDN labels/names over the RFC 1035 limits still pass in Python while the Worker refuses them · Issue #517 · developing-today/code

Description: Summary PR #514 (fix for #513) added the RFC 1035 §2.3.4 length check to both lab-ops-hub crawl validators, but the container check in pkgs/lab-ops-hub/container/app.py counts characters of the raw host, while the Worker's check in pkgs/...

Open Graph Description: Summary PR #514 (fix for #513) added the RFC 1035 §2.3.4 length check to both lab-ops-hub crawl validators, but the container check in pkgs/lab-ops-hub/container/app.py counts characters of the raw...

X Description: Summary PR #514 (fix for #513) added the RFC 1035 §2.3.4 length check to both lab-ops-hub crawl validators, but the container check in pkgs/lab-ops-hub/container/app.py counts characters of the raw...

Opengraph URL: https://github.com/developing-today/code/issues/517

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"lab-ops-hub: container validator's overlong-name check counts characters, not IDNA-encoded length — IDN labels/names over the RFC 1035 limits still pass in Python while the Worker refuses them","articleBody":"## Summary\n\nPR #514 (fix for #513) added the RFC 1035 §2.3.4 length check to both lab-ops-hub crawl validators, but the container check in `pkgs/lab-ops-hub/container/app.py` counts **characters of the raw host**, while the Worker's check in `pkgs/lab-ops-hub/src/lib.ts` counts the **punycode (IDNA-encoded) form**, because `u.hostname` there is already punycode. For non-ASCII (IDN) hosts the two lengths differ, so the container validator still certifies IDN names that are over the limits — exactly the hosts #513's acceptance criteria said must be refused \"with any label > 63 (**encoded**) characters\", with both validators \"matching each other's verdicts\".\n\nThe Python code's own comment states the gap's safe half only: character length is a lower bound on the encoded length, so the check can never *over*-refuse. It can and does *under*-refuse: an IDN label whose characters fit in 63 but whose punycode exceeds 63 octets passes the container validator as \"a public DNS name\" and then fails deep inside the fetcher when the IDNA encoder rejects it — the lazy-failure shape #513/#502/#507 exist to eliminate. Python's own `str.encode(\"idna\")` raises `UnicodeError: label empty or too long` for the probe label below.\n\n## Evidence (verified on current main `bf642287`, driving both real validators)\n\nContainer `validate_crawl_url` (`pkgs/lab-ops-hub/container/app.py`, overlong check at lines 69–74, comment at 60–68):\n\n```python\nif \":\" not in host and (\n    len(host) > 253 or any(len(label) > 63 for label in host.split(\".\"))\n):\n```\n\n`host` here is `urlparse(...).hostname.lower()` — the raw spelling, never IDNA-encoded anywhere in the validator.\n\nProbes (label = consecutive CJK codepoints U+4E00, U+4E01, …):\n\n| Host form | Char length | IDNA-encoded length | TS Worker | Python container |\n| --- | --- | --- | --- | --- |\n| `http://\u003c42-char CJK label>.com/` | label 42 | label 65 | **BLOCK** (overlong) | **ALLOW** |\n| `http://\u003c5 labels × 40 CJK chars>/` | name 204 | name 309 | **BLOCK** (overlong) | **ALLOW** |\n\nControls that must stay allowed on both sides: a 63-char ASCII label, a 253-char ASCII name (both pinned by PR #514's own tests), valid IDN hosts within the encoded limits (e.g. `examéple.com/`, and a 40-char CJK label whose IDNA form is 61 chars — ALLOW/ALLOW today).\n\n- PR: https://github.com/developing-today/code/pull/514, commit `f7311bb1e609d196a8f521738096973361c3f7a7`, merged as `c7a00eee8323e11e0fe545bf6c80d7f026c190b5`.\n- Origin issue #513 (CLOSED by #514) acceptance: \"Both validators refuse a host with any label > 63 (encoded) characters and a host whose full name is > 253 characters … matching each other's verdicts.\"\n- Distinct from open #516, which is about IDNA-**disallowed characters** (space separators, bidi/format controls, U+FFFD), not encoded length.\n- Cross-repo: the validator pair lives only in developing-today/code (the #510/#513 cross-repo checks found no twin in the opencode, openchamber or dezren39/nix clones), so this is a single-repo issue.\n\n## Why it matters\n\nThe container validator is the defence-in-depth re-check on the component that actually fetches (#441), and the parity premise of #468/#502/#505/#507/#510/#513 is that where the two validators disagree, the effective policy is the weaker one. For IDN hosts the container's length check is materially weaker: over-limit names are certified as public DNS names and die inside the fetcher's IDNA/resolver step with a low-level `UnicodeError` instead of the validator's clear up-front refusal.\n\n## Acceptance criteria\n\n- `validate_crawl_url` refuses, up front with the existing overlong-name error, a host whose **IDNA-encoded** label exceeds 63 octets or whose IDNA-encoded full name exceeds 253 characters (e.g. by judging the labels after per-label `idna`/punycode encoding, treating an encoding failure for length as a refusal).\n- Controls unchanged: 63-char ASCII label / 253-char ASCII name still accepted; valid IDN hosts within the encoded limits (including a 40-char CJK label, IDNA length 61) still accepted on both sides.\n- A regression test in `pkgs/lab-ops-hub/test/test_container_validate.py` covers the encoded-overlong label and encoded-overlong name cases plus an at-encoded-limit IDN control, and fails with only `container/app.py`'s length check reverted to character counting (ablation).\n- `npm test` in `pkgs/lab-ops-hub` passes (TS + Python), and a differential probe over ASCII at/over-limit and IDN at/over-encoded-limit hosts shows TS/Python verdict parity.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-22T00:30:04Z","url":"https://github.com/developing-today/code/issues/517"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:66c10744-7302-2e12-462e-062997923c27
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBC02:395268:867660:AE02C1:6B062C66
html-safe-nonceb8db3aa17eb7140b97ee7837147cfd0c0b1bfeda220378b1022b81a413815989
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzAyOjM5NTI2ODo4Njc2NjA6QUUwMkMxOjZCMDYyQzY2IiwidmlzaXRvcl9pZCI6IjkxNDY4NDA1MTQ2MTkxMjQ4MzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacffad90055ad251131bc13601fb95ce13e7de27ff3fa9841ef4cb0744cc252cfc
hovercard-subject-tagissue:5970770800
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/517/issue_layout
twitter:imagehttps://opengraph.githubassets.com/7181e6df73931a2bdc5884af8fa3ef6bfc9767bb3cdce1520c3feda499faedaf/developing-today/code/issues/517
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7181e6df73931a2bdc5884af8fa3ef6bfc9767bb3cdce1520c3feda499faedaf/developing-today/code/issues/517
og:image:altSummary PR #514 (fix for #513) added the RFC 1035 §2.3.4 length check to both lab-ops-hub crawl validators, but the container check in pkgs/lab-ops-hub/container/app.py counts characters of the raw...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedezren39
hostnamegithub.com
expected-hostnamegithub.com
None7f961de5dd5c5d4aca24d33f8b3ffb3fb8b2ef53d0a4f32f01f0a790e512f6d3
turbo-cache-controlno-preview
go-importgithub.com/developing-today/code git https://github.com/developing-today/code.git
octolytics-dimension-user_id26439447
octolytics-dimension-user_logindeveloping-today
octolytics-dimension-repository_id627308783
octolytics-dimension-repository_nwodeveloping-today/code
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id627308783
octolytics-dimension-repository_network_root_nwodeveloping-today/code
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release494ea0bb1e0feef734a83e2628697647755e8864
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/developing-today/code/issues/517#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F517
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F517
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=developing-today%2Fcode
Reloadhttps://github.com/developing-today/code/issues/517
Reloadhttps://github.com/developing-today/code/issues/517
Reloadhttps://github.com/developing-today/code/issues/517
developing-todayhttps://github.com/developing-today
codehttps://github.com/developing-today/code
Codehttps://github.com/developing-today/code
Issues1.1k (1.1k)https://github.com/developing-today/code/issues
Pull requests150 (150)https://github.com/developing-today/code/pulls
Discussionshttps://github.com/developing-today/code/discussions
Actionshttps://github.com/developing-today/code/actions
Projectshttps://github.com/developing-today/code/projects
Wikihttps://github.com/developing-today/code/wiki
Security and qualityhttps://github.com/developing-today/code/security
Insightshttps://github.com/developing-today/code/insights
https://github.com/developing-today/code
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/517
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/517
#523https://github.com/developing-today/code/pull/523
lab-ops-hub: container validator's overlong-name check counts characters, not IDNA-encoded length — IDN labels/names over the RFC 1035 limits still pass in Python while the Worker refuses themhttps://github.com/developing-today/code/issues/517#top
#523https://github.com/developing-today/code/pull/523
https://github.com/dezren39
https://github.com/dezren39
dezren39https://github.com/dezren39
on Oct 22, 2026https://github.com/developing-today/code/issues/517#issue-5970770800
#514https://github.com/developing-today/code/pull/514
#513https://github.com/developing-today/code/issues/513
#513https://github.com/developing-today/code/issues/513
#513https://github.com/developing-today/code/issues/513
#502https://github.com/developing-today/code/issues/502
#507https://github.com/developing-today/code/issues/507
#514https://github.com/developing-today/code/pull/514
lab-ops-hub: refuse overlong DNS names in both crawl validators (#513) #514https://github.com/developing-today/code/pull/514
lab-ops-hub: both crawl validators accept impossible DNS names — labels over 63 chars and names over 253 chars #513https://github.com/developing-today/code/issues/513
lab-ops-hub: refuse overlong DNS names in both crawl validators (#513) #514https://github.com/developing-today/code/pull/514
lab-ops-hub: container validator still allows IDNA-disallowed Unicode hosts (space separators, bidi/format controls, U+FFFD) the Worker validator refuses #516https://github.com/developing-today/code/issues/516
lab-ops-hub: container validator still allows DEL/C1-control, NBSP and WHATWG-forbidden (<>^|) hosts the Worker validator refuses #510https://github.com/developing-today/code/issues/510
lab-ops-hub: both crawl validators accept impossible DNS names — labels over 63 chars and names over 253 chars #513https://github.com/developing-today/code/issues/513
#441https://github.com/developing-today/code/issues/441
#468https://github.com/developing-today/code/issues/468
#502https://github.com/developing-today/code/issues/502
#505https://github.com/developing-today/code/issues/505
#507https://github.com/developing-today/code/issues/507
#510https://github.com/developing-today/code/issues/510
#513https://github.com/developing-today/code/issues/513
github-actionshttps://github.com/apps/github-actions
dezren39https://github.com/dezren39
on Oct 22, 2026https://github.com/developing-today/code/issues/517#event-33901562249
dezren39https://github.com/dezren39
completedhttps://github.com/developing-today/code/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#523https://github.com/developing-today/code/pull/523
on Oct 22, 2026https://github.com/developing-today/code/issues/517#event-33906746521
Sign up for freehttps://github.com/signup?return_to=https://github.com/developing-today/code/issues/517
Sign in to commenthttps://github.com/login?return_to=https://github.com/developing-today/code/issues/517
dezren39https://github.com/dezren39
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.