UPLC: Flat decoding accepts a byte string whose filler ends mid-byte
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 79/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- backend
Línea de trabajo
Empieza en UPLC.ts, en decodeByteString (línea 510) y _skipByte (línea 461), y luego compara la comprobación del límite de byte descrita en Plutus Decoder/Prim.hs (línea 443). Haz que la decodificación lance un UPLCError cuando el relleno termine a mitad de un byte; comprueba que se rechace la entrada hexadecimal indicada mientras que las cadenas de bytes válidas sigan decodificándose.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
UPLC.fromFlatHex("01010048a0354001") decodes to the byte string constant aa, and UPLC.toFlatHex writes it back as 010100488101aa0001. Plutus rejects the input.
In those bytes, the type list ends at bit 2 of the byte a0. The filler before the byte string is a single 1 bit, so it ends at bit 3 of that byte, and the chunk length and data that follow start mid-byte. decodeByteString (UPLC.ts:510) calls _skipByte (UPLC.ts:461), which reads bits until a 1 and never checks that it stopped on a byte boundary, then reads the chunks unaligned. Plutus reads the same filler (dFiller, PlutusCore/Flat/Decoder/Strict.hs:301-304) and then fails in getChunksInfo unless the position is byte aligned (Decoder/Prim.hs:443, badEncoding endPtr s "usedBits /= 0", at plutus 1.72.0.0).
Every byte string goes through this path: ByteString, String and Data constants, and with #667 the keys of Value constants. Only hand-made or corrupted input triggers it, and the ledger rejects such a script. The effect is that decoding and re-encoding changes the script bytes, and so its hash, where it should fail.
decodeByteString should throw a UPLCError when the filler does not end on a byte boundary.
- Lenguaje dominante
- TypeScript
- Estrellas
- 22
- Forks
- 35
- Merge medio
- 19 h 56 min
- PR fusionados (30 d)
- 58
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de IntersectMBO/evolution-sdk
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
IntersectMBO/evolution-sdk#559 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
IntersectMBO/evolution-sdk#557 ·
Los mantenedores suelen responder en 1 día
-
dependabot: remove stale @types/bip39 entriesPosiblemente ocupada @Kshot3000 la tomó hace 5 días. Abiertodependencies good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 93/100
IntersectMBO/evolution-sdk#541 ·
Los mantenedores suelen responder en 1 día
-
txBuilder: committee cert redeemers are never resolved to a certificate indexPosiblemente ocupada @Kshot3000 la tomó hace 6 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
IntersectMBO/evolution-sdk#518 ·
Los mantenedores suelen responder en 1 día
-
RewardAccount: validate header type bits and bech32 prefixPosiblemente ocupada @Kshot3000 la tomó hace 6 días. Abiertoenhancement external-review
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
IntersectMBO/evolution-sdk#456 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de IntersectMBO/evolution-sdk
Issues similares
-
[BUG] rag: sentence content can cross the reported sentence boundariesPosiblemente ocupada @LJK-ikun la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
README: the Resource URI Schemas example's file://documents/* pattern only matches that literal URIAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
platformatic/mcp#361 ·
Los mantenedores suelen responder en 1 día
-
frontend
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Push: sem service worker ou sem VAPID, o interruptor de Notificações fica ligado sem avisar nadaAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
melgarafael/DeskcommCRM#3164 ·
Los mantenedores suelen responder en 1 día