René's URL Explorer Experiment


Title: id(web): parse_iso_timestamp accepts out-of-range dates — month 13, day 0/32, Feb 30, hour 25 and pre-1970 years all return plausible-but-wrong timestamps · Issue #756 · developing-today/code · GitHub

Open Graph Title: id(web): parse_iso_timestamp accepts out-of-range dates — month 13, day 0/32, Feb 30, hour 25 and pre-1970 years all return plausible-but-wrong timestamps · Issue #756 · developing-today/code

X Title: id(web): parse_iso_timestamp accepts out-of-range dates — month 13, day 0/32, Feb 30, hour 25 and pre-1970 years all return plausible-but-wrong timestamps · Issue #756 · developing-today/code

Description: Problem parse_iso_timestamp in pkgs/id/src/web/routes.rs:148-201 — the parser behind classify_tag (routes.rs:125-141) for auto- backup tag names — performs no range validation on any component. Out-of-range values are silently ...

Open Graph Description: Problem parse_iso_timestamp in pkgs/id/src/web/routes.rs:148-201 — the parser behind classify_tag (routes.rs:125-141) for auto- backup tag names — performs no range validation on any comp...

X Description: Problem parse_iso_timestamp in pkgs/id/src/web/routes.rs:148-201 — the parser behind classify_tag (routes.rs:125-141) for auto-<ISO date> backup tag names — performs no range validation on an...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"id(web): parse_iso_timestamp accepts out-of-range dates — month 13, day 0/32, Feb 30, hour 25 and pre-1970 years all return plausible-but-wrong timestamps","articleBody":"## Problem\n\n`parse_iso_timestamp` in `pkgs/id/src/web/routes.rs:148-201` — the parser behind `classify_tag` (`routes.rs:125-141`) for `auto-\u003cISO date>` backup tag names — performs **no range validation** on any component. Out-of-range values are silently rolled over into a different, plausible timestamp instead of returning `None`, and a pre-1970 year is clamped to the epoch. The resulting `FileInfo.timestamp` (`routes.rs:714`, second pass of the file-list builder) therefore shows/sorts an auto-backup under a date its name does not contain.\n\n## Evidence (verified this run)\n\nThe function was extracted verbatim from current main and run standalone (`rustc -O`, unmodified logic). The valid control matches the known epoch exactly:\n\n| Input | Result | Correct behaviour |\n|---|---|---|\n| `2026-03-12T06:42:30Z` | `Some(1773297750)` | ✅ matches reference epoch |\n| `2026-13-01T00:00:00Z` | `Some(1798761600)` (= 2027-01-01) | month 13 rolls into next year |\n| `2026-00-01T00:00:00Z` | `Some(1767225600)` (= 2026-01-01) | month 0 silently becomes January |\n| `2026-03-00T00:00:00Z` | `Some(1772323200)` | **identical to `2026-03-01`** — day 0 == day 1 |\n| `2026-03-32T00:00:00Z` | `Some(1775001600)` (= 2026-04-01) | day 32 rolls into April |\n| `2026-02-30T00:00:00Z` | `Some(1772409600)` (= 2026-03-02) | Feb 30 rolls into March |\n| `2026-03-12T25:00:00Z` | `Some(1773363600)` | hour 25 rolls into the next day |\n| `2026-03-12T00:60:00Z` / `T00:00:60Z` | `Some(...)` | minute/second 60 roll over |\n| `1969-01-01T00:00:00Z` | `Some(0)` | **identical to the epoch** — the `1970..year` loop never runs and the date collapses to 1970-01-01 |\n\nContributing code:\n\n- `routes.rs:165-168` — components are collected with `filter_map(|p| p.parse().ok())`, so only count is checked, never range.\n- `routes.rs:182` — the month loop is capped only by the `month_days` array length, so month 13 accumulates a full year.\n- `routes.rs:190` — `day.saturating_sub(1)` makes day 0 indistinguishable from day 1.\n- `routes.rs:192` — `hour * 3600 + min * 60 + sec` accepts any hour/minute/second.\n\nRelated robustness note (same function): the days calculation loops `for y in 1970..year` with no upper bound, so a tag named e.g. `auto-999999999-01-01T00:00:00Z` makes the file-list handler iterate ~10⁹ times for that one name. A year-range check fixes this too.\n\nExisting tests (`routes.rs:2236-2259`) cover only a valid date, garbage strings, and the epoch — no out-of-range component is tested.\n\n## Why it matters\n\nAuto-backup names are generated (`auto-2026-03-12T06:42:30.015Z`), but tag names are user/peer-controlled data in a p2p store: a malformed or adversarial `auto-…` name is displayed and ordered as if it were a real backup from a different date (a \"Feb 30\" backup sorting as Mar 2, a 1969 backup claiming the epoch), and an absurd year can stall the file list. A parser that cannot represent a date should say so (`None`, which `classify_tag` already handles) rather than invent one.\n\n## Acceptance criteria\n\n- [ ] `parse_iso_timestamp` returns `None` for: month outside 1–12, day 0 or greater than the days in that month for that year (incl. Feb 29 on a non-leap year, Feb 30 always), hour > 23, minute > 59, second > 59.\n- [ ] Years before 1970 return `None` (the `u64` result cannot represent them) instead of `Some(0)`.\n- [ ] The year loop is bounded (the range check above suffices) — no per-year iteration for absurd years.\n- [ ] Valid inputs are unchanged: `2026-03-12T06:42:30.015Z` → `1773297750`, `1970-01-01T00:00:00Z` → `0`, Feb 29 on a leap year (e.g. 2024-02-29) parses correctly.\n- [ ] New unit tests next to the existing ones at `routes.rs:2236+` cover each rejected class and the leap-day cases; existing `test_classify_tag_*` / `test_parse_iso_timestamp_*` tests still pass.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-24T12:18:21Z","url":"https://github.com/developing-today/code/issues/756"}

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:656ab712-f0bd-9d9a-177e-d7e00e2d7e90
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB596:EC78C:8BD267:BA8761:6B06368A
html-safe-nonce603a9ec3fcc9029a8df3292d4800fa151c912a74112079d2c0de4cfa50b4dce6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTk2OkVDNzhDOjhCRDI2NzpCQTg3NjE6NkIwNjM2OEEiLCJ2aXNpdG9yX2lkIjoiMzI1NzY0NDcwODA5MTc5Nzg3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac09a0892948ad4a397175091580bc4104dd2abff650c43309e82deb975c40d2a1
hovercard-subject-tagissue:6012843215
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/756/issue_layout
twitter:imagehttps://opengraph.githubassets.com/1bfd77dc7e8588472d0acdd643883486515f179db7d06325f69a180f8aa2ed41/developing-today/code/issues/756
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1bfd77dc7e8588472d0acdd643883486515f179db7d06325f69a180f8aa2ed41/developing-today/code/issues/756
og:image:altProblem parse_iso_timestamp in pkgs/id/src/web/routes.rs:148-201 — the parser behind classify_tag (routes.rs:125-141) for auto- backup tag names — performs no range validation on any comp...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedezren39
hostnamegithub.com
expected-hostnamegithub.com
Nonec3584c853cd39700ecff6e2cf8364295ffdb5313e571046c41cd2479270f7df0
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
release9eb3bb1597d09170a5f282cd38ae376dee1a5ec1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/developing-today/code/issues/756#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F756
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%2F756
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/756
Reloadhttps://github.com/developing-today/code/issues/756
Reloadhttps://github.com/developing-today/code/issues/756
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 requests155 (155)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/756
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/756
#757https://github.com/developing-today/code/pull/757
id(web): parse_iso_timestamp accepts out-of-range dates — month 13, day 0/32, Feb 30, hour 25 and pre-1970 years all return plausible-but-wrong timestampshttps://github.com/developing-today/code/issues/756#top
#757https://github.com/developing-today/code/pull/757
https://github.com/dezren39
https://github.com/dezren39
dezren39https://github.com/dezren39
on Oct 24, 2026https://github.com/developing-today/code/issues/756#issue-6012843215
github-actionshttps://github.com/apps/github-actions
dezren39https://github.com/dezren39
on Oct 24, 2026https://github.com/developing-today/code/issues/756#event-34127414191
https://github.com/dezren39
dezren39https://github.com/dezren39
on Oct 24, 2026https://github.com/developing-today/code/issues/756#issuecomment-6388375422
dezren39https://github.com/dezren39
completedhttps://github.com/developing-today/code/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#757https://github.com/developing-today/code/pull/757
on Oct 25, 2026https://github.com/developing-today/code/issues/756#event-34160059059
Sign up for freehttps://github.com/signup?return_to=https://github.com/developing-today/code/issues/756
Sign in to commenthttps://github.com/login?return_to=https://github.com/developing-today/code/issues/756
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.