-
Notifications
You must be signed in to change notification settings - Fork 764
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
Allow comment characters within configuration values when using my.cnf #769
base: main
Are you sure you want to change the base?
Conversation
What about passwords with |
Oh, I see, this is to allow this. Wouldn't quotes used be a safer way to handle this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What prevents quotes around the value from solving this problem?
EDIT: It turns out you can escape comment chars by using backticks or triple quotes.
|
@patrickeasters Thanks for digging into the quoting. Perhaps we should update the README docs to recommend backtick quoting of passwords. |
I would also be fine with simply flipping |
Either of those sound better than the rabbit hole of reading docs of mysqld_exporter's dependencies and cursing the inconsistency of INI parsers. 😄 Updating the README is of course the safest, but I don't imagine a ton of folks using inline comments in these INI files either. |
This needs a DCO sign-off. You can use |
This PR will fix #376
I've configured
SpaceBeforeInlineComment
option to allow comment characters within values.see https://github.com/go-ini/ini/blob/b2f570e5b5b844226bbefe6fb521d891f529a951/ini.go#L97-L101