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 connection parsing in SOCI Firebird backend to handle spaces in values. #73

Merged
merged 1 commit into from Feb 18, 2013

Conversation

vadz
Copy link
Member

@vadz vadz commented Feb 18, 2013

This commit rewrites explodeISCConnectString() function to properly handle spaces in the values so that connection strings such as firebird://user=UID password=PWD service="c:\Program Files\foo.fdb" work correctly (before we tried to open "c:\Program as a file).

I don't know what is the exact syntax of SOCI connection strings supposed to be, in particular whether there is any quoting, so I didn't do anything fancy and just made the minimal changes necessary to make the paths with spaces in them to work.

…alues.

Really parse the connection strings instead of just breaking them on spaces.
This allows to detect errors such as not using "key=value" syntax at all but
most importantly allows to use spaces inside the values, as can be necessary
for the "service" parameter value when using embedded Firebird as the file
names can contain spaces.

Signed-off-by: Vadim Zeitlin <vz-soci@zeitlins.org>
@vnaydionov
Copy link
Member

Thank you a lot! The method for parsing was obviously too dumb.

18.02.2013, 17:38, "VZ" notifications@github.com:

This commit rewrites explodeISCConnectString() function to properly handle spaces in the values so that connection strings such as firebird://user=UID password=PWD service="c:\Program Files\foo.fdb" work correctly (before we tried to open "c:\Program as a file).

I don't know what is the exact syntax of SOCI connection strings supposed to be, in particular whether there is any quoting, so I didn't do anything fancy and just made the minimal changes necessary to make the paths with spaces in them to work.


You can merge this Pull Request by running

git pull https://github.com/vadz/soci fb-dsn-parse

Or view, comment on, or merge it at:

  #73

Commit Summary

  • Fix connection parsing in SOCI Firebird backend to handle spaces in values.

File Changes

  • M src/backends/firebird/session.cpp (159)

Patch Links:

С уважением,
Вячеслав Найденов.

@ghost ghost assigned vnaydionov Feb 18, 2013
vnaydionov added a commit that referenced this pull request Feb 18, 2013
Fix connection parsing in SOCI Firebird backend to handle spaces in values.
@vnaydionov vnaydionov merged commit 4309f19 into SOCI:master Feb 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants