From a75c859eedff4431b815d3d496e3122225332c28 Mon Sep 17 00:00:00 2001 From: Kees Monshouwer Date: Tue, 31 Dec 2013 09:21:51 +0100 Subject: [PATCH] goracle backend escaping --- modules/goraclebackend/soracle.cc | 4 ++-- pdns/zone2sql.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/goraclebackend/soracle.cc b/modules/goraclebackend/soracle.cc index a76b07d71..80ffc5f20 100644 --- a/modules/goraclebackend/soracle.cc +++ b/modules/goraclebackend/soracle.cc @@ -247,8 +247,8 @@ string SOracle::escape(const string &name) string a; for(string::const_iterator i=name.begin();i!=name.end();++i) { - if(*i=='\'') - a+='\''; + if(*i=='\\' || *i=='\'') + a+='\\'; a+=*i; } return a; diff --git a/pdns/zone2sql.cc b/pdns/zone2sql.cc index 7f371d40e..0cfec047f 100644 --- a/pdns/zone2sql.cc +++ b/pdns/zone2sql.cc @@ -68,7 +68,7 @@ static string stripDotContent(const string& content) static string sqlstr(const string &name) { - if(g_mode == SQLITE) + if(g_mode == SQLITE || g_mode==ORACLE) return "'"+boost::replace_all_copy(name, "'", "''")+"'"; string a; -- 2.40.0