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

Parsing special characters, ex: # number signs #44

Open
digitaldavenyc opened this issue Jul 28, 2015 · 2 comments
Open

Parsing special characters, ex: # number signs #44

digitaldavenyc opened this issue Jul 28, 2015 · 2 comments

Comments

@digitaldavenyc
Copy link

When parsing values like 6#G222 ini parser ignores all values after #. Values like this are used between multiple languages and needs to be able parse password values.

[db]
user = admin
password = 6#G222@!ds9DlA0492SlL82
@dpmramesh
Copy link

I also facing this problem. I have a value like sed -i s/^\(server .*iburst\)/#\1/' /etc/ntp.conf. But the values after # is truncated. It will be really helpful if this is fixed are or if there is any workaround.

@svrnm
Copy link

svrnm commented Mar 8, 2017

You need to quote # and ; - since they introduce comments. So the following works:

[db]
user = admin
password = 6\#G222@!ds9DlA0492SlL82

It's a little bit unexpected, because you normally don't have inline comments with ini files.

gerrit-ovirt-org pushed a commit to oVirt/cockpit-ovirt that referenced this issue Feb 11, 2019
Following bugs are fixed as part of this patch.

1. Consider the RAID parameters for the gdeploy configuration.
2. Fix spelling issues in stripe size.
3. Fix special char issue in gdeploy template.
   Following gdeploy configuration has a special char '#' in
   the configuration. So it has to be coverd with a quote.
   command=sed -i 's/^\(server .*iburst\)/#\1/' /etc/ntp.conf

   Related bug in ini package
     npm/ini#44

Change-Id: I3295e245ac488ab09af159e5e43cb54f5c77c11d
gerrit-ovirt-org pushed a commit to oVirt/cockpit-ovirt that referenced this issue Feb 16, 2019
Following bugs are fixed as part of this patch.

1. Consider the RAID parameters for the gdeploy configuration.
2. Fix spelling issues in stripe size.
3. Fix special char issue in gdeploy template.
   Following gdeploy configuration has a special char '#' in
   the configuration. So it has to be coverd with a quote.
   command=sed -i 's/^\(server .*iburst\)/#\1/' /etc/ntp.conf

   Related bug in ini package
     npm/ini#44

Change-Id: I3295e245ac488ab09af159e5e43cb54f5c77c11d
(cherry picked from commit 2f28c90)
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

No branches or pull requests

3 participants