Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bytesToPacket doesn't handle malformed label packet correctly #222

Open
shrugs opened this issue Jan 20, 2025 · 0 comments
Open

bytesToPacket doesn't handle malformed label packet correctly #222

shrugs opened this issue Jan 20, 2025 · 0 comments

Comments

@shrugs
Copy link

shrugs commented Jan 20, 2025

For example, in this tx 0x4ece50ae828f2a0f27f45d086e85a55e6284bff31a0a89daca9df4b1b1f5cb75 the name input is 8436.eth (it should have been just 8436, as the .eth is inferred).

This operates against a name that actually looks like [fb1d24d5dc41613d5b4874e6cccb06ecf442f6f1773c3771c4fcce1161985a18].eth
which results in a namehash of 0xfb1d24d5dc41613d5b4874e6cccb06ecf442f6f1773c3771c4fcce1161985a18
and the NameWrapper emits an event with the packet bytes of 08383433362E6574680365746800.
when ensjs#bytesToPacket sees these bytes, it returns a name of 8436.eth.eth, which is incorrect.

bytesToPacket(hexToBytes("0x08383433362E6574680365746800")) === '8436.eth.eth'

additional context is available in namehash/ensnode#36 (comment)

@shrugs shrugs changed the title bytesToPacket doesn't handle malformed packet correctly bytesToPacket doesn't handle malformed label packet correctly Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@shrugs and others
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy