[cpp-sp] 01/06: SSPCPP-1014 - Extend escaping in strings
Codeberg
noreply at shibboleth.net
Wed Aug 12 19:20:03 UTC 2026
This is an automated email from the git hooks/post-receive script.
codeberg pushed a commit to branch maint-3
in repository cpp-sp.
View the commit online:
https://codeberg.org/Shibboleth/cpp-sp/commit/ef09939826068d25214cd21f8720188c4bf6c5bc
commit ef09939826068d25214cd21f8720188c4bf6c5bc
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Sep 3 08:45:54 2025 -0400
SSPCPP-1014 - Extend escaping in strings
---
odbc-store/odbc-store.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/odbc-store/odbc-store.cpp b/odbc-store/odbc-store.cpp
index 2316e95c..aae85204 100644
--- a/odbc-store/odbc-store.cpp
+++ b/odbc-store/odbc-store.cpp
@@ -255,9 +255,10 @@ namespace {
string m_copy;
public:
SQLString(const char* src) : m_src(src) {
- if (strchr(src, '\'')) {
+ if (strchr(src, '\\') || strchr(src, '\'')) {
m_copy = src;
- replace_all(m_copy, "'", "''");
+ replace_all(m_copy, "\\", "\\\\");
+ replace_all(m_copy, "'", "\\'");
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list