-
Notifications
You must be signed in to change notification settings - Fork 148
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
RPC: Validate name_anyupdate values #191
Comments
We now have a JSON @JeremyRand, do you still believe this should be done directly in Namecoin Core? |
@domob1812 This was closed by accident and should be re-opened because it's still relevant (cf. the discussion with @JeremyRand in #436). I should also add, in response to Mr. Rand's comment:
Even so, Tor Project do not endeavor to merge the Tor and the Firefox codebases, nor to add in web-aware code in the |
@domob1812 Are you arguing that validation of user-entered name values should not be in Namecoin Core at all, or are you arguing that it should only be in Namecoin-Qt (not namecoind)? If the former, how do you propose solving the UX issue of users entering bad data? If the latter, what are your grounds for deviating from standard Bitcoin Core policy (i.e. new functionality should be added to RPC before being added to GUI)? |
I would like to see validation in the Qt only. The reason is that this is functionality that is IMHO unrelated to the core function of |
@domob1812 I don't think this is actually the case. The |
The code exists, but the RPC does not actually expose the functionality, does it? Maybe that was changed and I missed it, though. In any case, I think I made my point clear, that I don't like the idea of having any application-specific code in the core codebase. If you disagree, that's fine. And as long as the code is clearly separated (e.g. in its own |
Okay, segregating namespace-aware RPC methods into their own source code file seems like a reasonable compromise. Running
|
Describe the issue
The
name_anyupdate
RPC methods do not perform any validation of the name or value.Can you reliably reproduce the issue?
Yes.
If so, please list the steps to reproduce below:
name_update
to a value that's invalid JSON,name_firstupdate
ad/
name that includes uppercase characters, or any name data that otherwise violates the namespace specifications.Expected behaviour
An error should be given, unless the user passes an optional flag to disable validity checking.
Actual behaviour
No validity checking occurs.
What version of namecoin-core are you using?
nc0.13.99-name-tab-beta1
Machine specs:
Any extra information that might be useful in the debugging process.
Obviously Namecoin's consensus rules allow arbitrary binary blobs in the name or the value, so validity checking should be disableable by people who know what they're doing. However, it's still useful for preventing accidental user errors. I'm open to suggestions on what exactly the UX should be here, but I suggest that we might consider replacing the destination address in the
name_anyupdate
methods with a JSON object that allows setting the address, as well as setting whether validation of name and value is performed. This JSON object might also be a useful way to allow the user to control whether ASCII or binary data is being provided in the name and value fields, as discussed in #164 .The text was updated successfully, but these errors were encountered: