Allow comment characters within configuration values when using my.cnf#769
Allow comment characters within configuration values when using my.cnf#769buzztaiki wants to merge 1 commit intoprometheus:mainfrom
Conversation
|
What about passwords with |
|
Oh, I see, this is to allow this. Wouldn't quotes used be a safer way to handle this? |
SuperQ
left a comment
There was a problem hiding this comment.
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
SpaceBeforeInlineCommentoption to allow comment characters within values.see https://github.com/go-ini/ini/blob/b2f570e5b5b844226bbefe6fb521d891f529a951/ini.go#L97-L101