upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/reference/relay-limits.md
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-04-10 16:42:35 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-04-10 16:42:35 +0000
commitdfd20a39a7ddaea07103cac45d4d79bc7e6ce0d7 (patch)
treef4d3c38c09c7b27a25f6b6933c9de0e42149c82f /docs/reference/relay-limits.md
parent2d74b9ca69b3a1e0b9a2359c12cc2d1979fc6130 (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 'docs/reference/relay-limits.md')
0 files changed, 0 insertions, 0 deletions