GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Decoder accepts non-minimal encoding · Issue #297 · msgpack/msgpack-javascript Closed as duplicate DescriptionSummaryThe decoder accepts input that violates the specification's canonicalization requirements. Specifically, it does not enforce: msgpack-shortest-integer. Specificationmsgpack-shortest-integer: The MessagePack specification directs an encoder to use the shortest representation that holds the value, so a decoder that accepts a wider encoding admits a second encoding of a value its own encoder would never emit. Source: https://github.com/msgpack/msgpack/blob/master/spec.md Affected Version
ReproductionThe following hex-encoded byte strings demonstrate the issue. Each should be rejected by a strict decoder but is currently accepted: Witnesses (should be rejected):
Canonical controls (correctly accepted):
Detection MethodDecode with the library's public API, re-encode the decoded value with the SAME library's encoder, and compare bytes. The library is its own reference, so no second implementation is needed: accepting bytes its own encoder would never emit is the defect. ImpactA decoder that admits a non-canonical encoding of a value its own encoder would never produce breaks the one-encoding-per-value property that content addressing and signature verification rely on. No chain-level reachability is claimed here. Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |