#569 closed Bug / Defect (fixed)
White space before end tags can break the config parser
Reported by: | Samuli Seppänen | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | release 2.3.9 |
Component: | Generic / unclassified | Version: | OpenVPN git master branch (Community Ed) |
Severity: | Not set (select this one, unless your'e a OpenVPN developer) | Keywords: | parser |
Cc: | plaisthos |
Description
This one works:
### connection #1 <connection> remote server.ip.add port </connection>
This one does not:
### connection #2 <connection> remote server.ip.add port </connection>
Instead it throws an error. On 2.3_git [20150526_1222]:
Options error: Unrecognized option or missing parameter(s) in [CONNECTION-OPTIONS]:2: /connection (2.3_git) Use --help for more information.
On Windows + OpenVPN 2.3.6:
Options error: Unrecognized option or missing parameter(s) in [CONNECTION-OPTIONS]:2: /connection (2.3.6) Use --help for more information. Press any key to continue...
It looks like the config parser sees the linefeed, thinks there's another directive coming up and barfs when the next line (directive) has no content except spaces. I think we should fix it in the code if possible.
This was originally reported by debbie10t as a part of ticket #395
Change History (6)
comment:1 Changed 9 years ago by
Cc: | Steffan Karger added |
---|
comment:2 Changed 9 years ago by
Cc: | plaisthos added; Steffan Karger removed |
---|
wrong vict... uh... volunteer
comment:3 Changed 9 years ago by
Milestone: | release 2.3.8 → release 2.3.9 |
---|
comment:4 Changed 8 years ago by
I noticed this ([PATCH] Fix trac ticket #569):
http://sourceforge.net/p/openvpn/mailman/openvpn-devel/thread/1444493569-24026-1-git-send-email-janjust%40nikhef.nl/#msg34530633
So I did some quick tests and they all passed correctly.
comment:5 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
That patch actually does *not* work for all cases, but plaisthos put in a fixed patch - so in git we now have
commit c67acea173dc9ee37220f5b9ff14ede081181992
Author: janjust <janjust@…>
Date: Sat Oct 10 18:12:49 2015 +0200
Fix "White space before end tags can break the config parser"
commit cba33989101175ac07434b9c5cceba116bf38127
Author: Arne Schwabe <arne@…>
Date: Wed Oct 14 15:05:56 2015 +0200
Fix commit c67acea173dc9ee37220f5b9ff14ede081181992
... and with that, it really should work now. Both patches are in the release/2.3 branch as well, to be relased as part of 2.3.9.
Closing this ticket for now.
comment:6 Changed 8 years ago by
Sorry .. I did not make myself clear: I tested git/master cloned 20151016 (today)
cc: to our config wonder man