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

MYST-546/Refactor spaces in option values handling #258

Merged
merged 3 commits into from Jun 5, 2018

Conversation

Projects
None yet
3 participants
@tadovas
Copy link
Member

commented Jun 4, 2018

Actually args passed to openvpn doesn't need any escaping. It was a problem on our side - how we serialized params and options into array of strings as args. We did splitting by space our selfes - ignoring the fact that arg itself can contain spaces.

@tadovas tadovas requested a review from Waldz as a code owner Jun 4, 2018

@tadovas tadovas force-pushed the bugfix/MYST-546-openvpn-args-escaping branch from 9db46a9 to b61006d Jun 4, 2018

@@ -106,8 +107,8 @@ func NewClientConfigFromSession(vpnConfig *VPNConfig, configDir string, configFi
config := ClientConfig{NewConfig(configDir)}
config.AddOptions(OptionFile("config", configAsString, configFile))

config.setParam("up", filepath.Join(configDir, "update-resolv-conf"))
config.setParam("down", filepath.Join(configDir, "update-resolv-conf"))
config.setParam("up", fmt.Sprintf("\"%s\"", filepath.Join(configDir, "update-resolv-conf")))

This comment has been minimized.

Copy link
@Waldz

Waldz Jun 5, 2018

Member

Not clear intention why this hack is done

This comment has been minimized.

Copy link
@Waldz

Waldz Jun 5, 2018

Member

` symbol could also be used instead of "

tadovas added some commits Jun 4, 2018

@tadovas tadovas force-pushed the bugfix/MYST-546-openvpn-args-escaping branch from b61006d to d66b240 Jun 5, 2018

@Waldz

Waldz approved these changes Jun 5, 2018

@ignasbernotas
Copy link
Member

left a comment

LGTM

@tadovas tadovas merged commit 689f596 into master Jun 5, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@tadovas tadovas deleted the bugfix/MYST-546-openvpn-args-escaping branch Jun 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.