Title: id(artifact): parsed() accepts non-NFC text in document and tag — media_type, tag name and value bypass the NFC rule documents.rs and tag_claims.rs both enforce · Issue #3192 · developing-today/code · GitHub
Open Graph Title: id(artifact): parsed() accepts non-NFC text in document and tag — media_type, tag name and value bypass the NFC rule documents.rs and tag_claims.rs both enforce · Issue #3192 · developing-today/code
X Title: id(artifact): parsed() accepts non-NFC text in document and tag — media_type, tag name and value bypass the NFC rule documents.rs and tag_claims.rs both enforce · Issue #3192 · developing-today/code
Description: Problem SignedArtifact::parsed() (pkgs/id/src/artifact.rs) accepts non-NFC text in the two known kinds that carry free text, while every sibling text path in the same crate refuses non-NFC: DOCUMENT arm (artifact.rs:356-371): checks only...
Open Graph Description: Problem SignedArtifact::parsed() (pkgs/id/src/artifact.rs) accepts non-NFC text in the two known kinds that carry free text, while every sibling text path in the same crate refuses non-NFC: DOCUMEN...
X Description: Problem SignedArtifact::parsed() (pkgs/id/src/artifact.rs) accepts non-NFC text in the two known kinds that carry free text, while every sibling text path in the same crate refuses non-NFC: DOCUMEN...
Opengraph URL: https://github.com/developing-today/code/issues/3192
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"id(artifact): parsed() accepts non-NFC text in document and tag — media_type, tag name and value bypass the NFC rule documents.rs and tag_claims.rs both enforce","articleBody":"## Problem\n\n`SignedArtifact::parsed()` (`pkgs/id/src/artifact.rs`) accepts non-NFC text in the two known kinds that carry free text, while every sibling text path in the same crate refuses non-NFC:\n\n- `DOCUMENT` arm (artifact.rs:356-371): checks only `media_type` empty / >128 bytes and content size. A decomposed media type such as `text/cafe\\u{301}` (e + combining acute U+0301) is accepted and stored.\n- `TAG` arm (artifact.rs:372-385): checks only subject hash, name 1–64 bytes, value ≤256 bytes. A decomposed tag name (`aute\\u{301}ur`) or value (`cafe\\u{301}`) is accepted and stored.\n\nThe sibling rules that these kinds bypass:\n\n- `documents.rs` `DocumentRef::check()` (documents.rs:105-121) refuses a media type that is not NFC — its doc comment states the rule and it is pinned by `test_the_media_type_is_one_to_128_bytes_in_nfc`. Same 128-byte cap as the artifact arm, minus the NFC half.\n- `tag_claims.rs` `check_text()` (tag_claims.rs:146-160), used by `check_op` for `tag.set`, requires NFC for name and value.\n- `chain.rs` (chain.rs:198, chain.rs:367) requires NFC for event kinds and text strings.\n\n## Why it matters\n\nAn artifact is a signed, stored, propagated statement: `parsed()` is the trust-boundary check before a known kind is applied (directory.rs publishes/applies `Kind::Document` and `Kind::Tag`). Two spellings of the same media type / tag name — NFC and decomposed — are different byte strings, so lookups, equality, and tag-name matching split on a difference no user can see: a document published with a decomposed media type does not match the NFC spelling a reader asks for, and a decomposed tag name forms a separate tag from the composed one. The event/chain side of the same system canonicalizes on NFC; the artifact side silently does not, so the same logical statement is valid in one store and refused in the other.\n\n## Evidence (verified this run)\n\n- Code: artifact.rs:356-385 (above) vs documents.rs:113-117 and tag_claims.rs:152-154 — the NFC check exists in both sibling validators and is absent from both artifact arms.\n- Laptop probe (probe-2026-10-31-laneA-nfc, on the laptop clone at the same HEAD 236cb985, artifact.rs sha256 bdc11bbe on both clones) driving the real `SignedArtifact::sign` + `parsed()`: control NFC document/tag ACCEPTED; non-NFC media_type, tag name, and tag value all ACCEPTED by `parsed()`.\n- Dedup: open + recently closed search for NFC / non-NFC / normalization against artifact kinds found no existing issue covering the artifact `document`/`tag` arms (sibling of #3187 home_declared world_id and #3146 friend_remove requests — same function, different kinds/fields/rules; the parsed-shape contract design is #3068).\n\n## Acceptance criteria\n\n- `parsed()` refuses a `document` whose `media_type` is not NFC, with a `Refusal::Forbidden` naming the rule, pinned by a parsed()-level test using a decomposed spelling.\n- `parsed()` refuses a `tag` whose `name` or `value` is not NFC, likewise pinned.\n- Ordinary NFC documents and tags (existing artifact tests) parse exactly as today.\n- The check is shared with, or explicitly mirrors, the existing NFC rules in `documents.rs` / `tag_claims.rs` so the three validators cannot drift again (e.g. one helper, or a test that walks all three).\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-31T19:17:10Z","url":"https://github.com/developing-today/code/issues/3192"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ce74f4c9-988b-8551-3dfc-01c4accff382 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EC90:15F7F4:B0950C:E475F2:6B0638E0 |
| html-safe-nonce | e1950d31589e7f4173e6cc96bfe6188cb01941abafa6c63b3335ea85b094ae3c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQzkwOjE1RjdGNDpCMDk1MEM6RTQ3NUYyOjZCMDYzOEUwIiwidmlzaXRvcl9pZCI6Ijg4NDI5NzE4NTMzMDUwMzQ5NzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 03917211cf4d1d2f3da63c7937bb455936de9aff1812770b2fd4dd61bb081502 |
| hovercard-subject-tag | issue:6138769728 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/3192/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0147f93e92af4fb0674c346fc5c06ed39541e0fb9ce255d9dd164a4ee9671f11/developing-today/code/issues/3192 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0147f93e92af4fb0674c346fc5c06ed39541e0fb9ce255d9dd164a4ee9671f11/developing-today/code/issues/3192 |
| og:image:alt | Problem SignedArtifact::parsed() (pkgs/id/src/artifact.rs) accepts non-NFC text in the two known kinds that carry free text, while every sibling text path in the same crate refuses non-NFC: DOCUMEN... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | dcf72c457c022486d23c3cbb0dd21aba537a87611ca9ddabd1799cf2eaa9b297 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0f38f5735226749ec5e08a8649dce4cb2613d9ad |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width