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

Fix config parser #209

Merged
merged 2 commits into from
Nov 3, 2017
Merged

Fix config parser #209

merged 2 commits into from
Nov 3, 2017

Conversation

InsanePrawn
Copy link
Contributor

Hi,
in its current state, the config parser would reject empty lines and comments that do not include a '=' character as syntax errors, since the check for '=' happens before the check for the comment indicator.
I fixed that.
Also, I saw a small bug possibility in that the parser never trimmed the whitespace of the value section of the key=value pair, so key= value would've resulted in value being " value". I could not imagine a scenario in which this might be wanted or useful, so i added a trim() for that.
I'm using the master branch on my desktop machines since there still is no 4.13 compatible release.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.003%) to 46.741% when pulling 5da1e69 on InsanePrawn:master into ddb2511 on dkopecek:master.

@dkopecek dkopecek self-requested a review November 3, 2017 08:18
Copy link
Member

@dkopecek dkopecek left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks a lot!

@dkopecek dkopecek merged commit 415b9f3 into USBGuard:master Nov 3, 2017
dkopecek pushed a commit that referenced this pull request Nov 6, 2017
Related: #209
Related: commit 205cbd8
Related: commit 50bee3a
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

Successfully merging this pull request may close these issues.

None yet

3 participants