diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-04-10 16:42:35 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-04-10 16:42:35 +0000 |
| commit | dfd20a39a7ddaea07103cac45d4d79bc7e6ce0d7 (patch) | |
| tree | f4d3c38c09c7b27a25f6b6933c9de0e42149c82f /Cargo.lock | |
| parent | 2d74b9ca69b3a1e0b9a2359c12cc2d1979fc6130 (diff) | |
fix: accept any d-tag identifier; percent-encode in URLs
NIP-01 places no restriction on d tag characters and NIP-34 only
recommends kebab-case without mandating it. Rejecting identifiers with
whitespace or other URL-unsafe characters was therefore overly strict.
The correct approach (per NIP-34 PR #2312 and GRASP-01) is to store
identifiers verbatim on disk and percent-encode them when constructing
URLs. The previous commit already handled the incoming direction
(percent-decoding URL paths before filesystem lookup); this commit
handles the outgoing direction and removes the validation restriction.
Changes:
- validate_identifier: drop whitespace rejection; only reject chars
that are unsafe as filesystem directory names (/, \, null, . / ..)
- git/mod.rs: add percent_encode() alongside percent_decode()
- landing.rs: percent-encode identifier in nostr:// clone URL and
gitworkshop link (also fixes a pre-existing bug where the clone URL
displayed literal '{npub}' / '{identifier}' instead of the values)
Diffstat (limited to 'Cargo.lock')
0 files changed, 0 insertions, 0 deletions