Legacy artifact hash normalises member names, so NFC-equivalent names hash identically

Aperta
#161 2 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@xm33 ci sta già lavorando.

Dal 3/11/2026.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
security

Direzione di ricerca

Start with reference-implementations/dacs-directory/src/catalog/legacyListingHash.ts around line 30, where member names are NFC-normalised before sorting and serialising. Check the callers in listingVerification.ts (line 336) and bundlePolicy.ts (lines 135 and 212) to see which legacy hashes must keep their current output. Done means that objects with NFC-equivalent member names are rejected, names that are not NFC are rejected, and tests cover both key orders, nested objects, and a non-ASCII name that normalises to ASCII.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

contributors-section

This repo holds community tools for DACS, an open standard for agent commerce, including the reference Directory.

Paths and line numbers are as of main at commit 58055373.

reference-implementations/dacs-directory/src/catalog/legacyListingHash.ts:30 NFC-normalises object member names before sorting and serialising. Two names that are equal after NFC (for example a precomposed and a decomposed é, or U+212A and K) end up as duplicate names in the serialization. Objects that differ only in how member names are spelled then get the same legacyListingHash. The hash is used for legacy Listings (listingVerification.ts:336) and historical bundle artifacts (bundlePolicy.ts:135, :212). The current-profile canonicalizer (canonical.ts:20, SDK jcs.ts) keeps names byte-exact and is not affected.

Fix: in legacyListingHash/legacyCanonicalize, recursively reject any object with two member names that are equal after NFC, and any member name that is not already NFC, instead of serialising them. Test both key orders, nested objects, and a non-ASCII name that normalises to an ASCII one.

Send the fix as a pull request to phase0-completion. It merges once tests pass and a maintainer has approved it.

Lingua principale
TypeScript
Stelle
0
Fork
3
Merge medio
20h 26m
PR unite (30g)
119

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DACS-Agent-commerce/Community

Tutte le issue di DACS-Agent-commerce/Community

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.