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

ncdumpzone infinite loop in Namecoin Core 0.18.0 #105

Closed
JeremyRand opened this issue Jul 31, 2019 · 1 comment · Fixed by #106
Closed

ncdumpzone infinite loop in Namecoin Core 0.18.0 #105

JeremyRand opened this issue Jul 31, 2019 · 1 comment · Fixed by #106

Comments

@JeremyRand
Copy link
Member

Namecoin Core 0.18.0 omits the "name" field from name_show and name_scan results when an encoding error occurs (e.g. a non-ASCII name when the requested encoding is ASCII). Unfortunately, ncdumpzone is interpreting this as the empty string, and as a result ncdumpzone sets currentName to the empty string if the final name_scan result had an encoding error. This produces an infinite loop.

@JeremyRand
Copy link
Member Author

The "right" way to solve this is to use hex encoding in ncdns's communication with Namecoin Core, but that will break compatibility with old Namecoin Core releases that are still used in the wild. A temporary hack that will produce acceptable results is to check for the name_error field in the final result, and remove the final result if it's present.

JeremyRand added a commit to JeremyRand/ncdns that referenced this issue Aug 1, 2019
Namecoin Core 0.18.0+ now reports an empty Name with a non-empty NameError
when an encoding error was encountered.  This was causing an infinite loop
in ncdumpzone.

Fixes namecoin#105
JeremyRand added a commit to JeremyRand/ncdns that referenced this issue Aug 2, 2019
Namecoin Core 0.18.0+ now reports an empty Name with a non-empty NameError
when an encoding error was encountered.  This was causing an infinite loop
in ncdumpzone.

Fixes namecoin#105
JeremyRand added a commit to JeremyRand/ncdns that referenced this issue Aug 2, 2019
Namecoin Core 0.18.0+ now reports an empty Name with a non-empty NameError
when an encoding error was encountered.  This was causing an infinite loop
in ncdumpzone.

Fixes namecoin#105
JeremyRand added a commit to JeremyRand/ncdns that referenced this issue Oct 27, 2019
Namecoin Core 0.18.0+ now reports an empty Name with a non-empty NameError
when an encoding error was encountered.  This was causing an infinite loop
in ncdumpzone.

Fixes namecoin#105
JeremyRand added a commit that referenced this issue Oct 28, 2019
539bc89 ncdumpzone: Work around encoding errors (JeremyRand)

Pull request description:

  Fixes #105

  TODO:

  - [x] Merge #103 (this PR will then need a rebase)

ACKs for commit 539bc8:

Tree-SHA512: 5762687077ea2611cd7939dd49d337346b212a91442b32f7be5ac592e2580029bc0e63c4e6597b2685495de59a431fe422048fc3a1f0d52fb678e377eb947401
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

Successfully merging a pull request may close this issue.

1 participant