Skip to content

Conversation

luke-jr
Copy link
Member

@luke-jr luke-jr commented Dec 2, 2020

By tolerating unknown extra rpcauth parameters (and ignoring the rpcauth), we can ensure a limited forward compatibility by not forcing users to downgrade their config file to switch back to older versions (perhaps temporarily).

To avoid any possible confusion, a message is still printed at startup, and returned as part of the error message if the user attempts to authenticate using the correct username/password.

g_rpcauth.push_back(fields);
if (fields.size() > MAX_RPCAUTH_VALUES) {
LogPrintf("Unrecognised -rpcauth parameters for username '%s'. User will not be able to authenticate.\n", SanitizeString(fields[0]));
}
} else {
LogPrintf("Invalid -rpcauth argument.\n");
return false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are overcomplicating this. No need for a +53-7 patch when this line could be removed in a -1+0 patch to achieve the same user experience

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jnewbery
Copy link
Contributor

jnewbery commented Dec 3, 2020

NACK for the same reason as here: #20550 (comment).

We shouldn't make error handling worse in Bitcoin Core to make life easier for maintainers of downstream projects.

@maflcko
Copy link
Member

maflcko commented Dec 3, 2020

Closing for now due to controversy

@maflcko maflcko closed this Dec 3, 2020
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants