I've been looking at all three of these database libraries, and I'm wondering if they do anything to prevent SQL injection. I'm most likely going to be building a lib on top of one of them, and injection is a top concern I have in picking one. Anybody know?
Preventing SQL injection in C++ OTL, DTL, or SOCI libraries
3.3k Views Asked by Brett Rossier At
2
There are 2 best solutions below
Related Questions in C++
- C++ using std::vector across boundaries
- Linked list without struct
- Connecting Signal QML to C++ (Qt5)
- how to get the reference of struct soap inherited in C++ Proxy/Service class
- Why we can't assign value to pointer
- Conversion of objects in c++
- shared_ptr: "is not a type" error
- C++ template using pointer and non pointer arguments in a QVector
- C++ SFML 2.2 vectors
- Lifetime of temporary objects
- I want to be able to use 4 different variables in a select statement in c ++
- segmentation fault: 11, extracting data in vector
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- How can I print all the values in this linked list inside a hash table?
- Configured TTL for A record(s) backing CNAME records
Related Questions in DATABASE
- When dealing with databases, does adding a different table when we can use a simple hash a good thing?
- How to not load all database records in my TListbox in Firemonkey Delphi XE8
- microsoft odbc driver manager data source name not found and no default driver specified
- Cloud Connection with Java Window application
- Automatic background scan if user edit column?
- Jmeter JDBC Connection Configuration Parametrization of Database URL for accessing SQL Database
- How to grant privileges to current user
- MySQL: Insert a new row at a specific primary key, or alternately, bump all subsequent rows down?
- Inserting and returning autoidentity in SQLite3
- Architecture: Multiple Mongo databases+connections vs multiple collections with Express
- SQL - Adding a flag based on results within a query - best practice?
- Android database query not returning any results
- Developing a search and tag heavy website
- Oracle stored procedure wrapping compile error with inline comments
- Problems communicating with mysql in php
Related Questions in SQL-INJECTION
- Is this SQL query, injection safe
- How to avoid SQL injection when a query is coming as a parameter of a method in Java?
- What should I do first, bind a parameter or apply a filter? PHP
- sql injection - when the statement is already in the db
- Using IIS url rewrite to protect against SQL injection
- How do i prevent PHP-files form SQL-Injections?
- How do I prevent MySQL Database Injection Attacks using vb.net?
- Prevent SQL Injection when the table name and where clause are variables
- How to fix Provider error '80020005' Type Mismatch
- PHP / MySQLi: How to prevent SQL injection on INSERT (code partially working)
- Hashed password must be sanitized?
- How to SQL inject when mysql_real_escape_string is used
- PHP: While loop not working after adjusting SELECT for SQL injection prevention
- How can I prevent SQL injection?
- preventing sql injection in php
Related Questions in SOCI
- How to provide the values corresponding to the placeholders in soci?
- SOCI clob data type in oracle c++
- Is it possible to manage table relationships with SOCI c++ database access library
- Issue with rowset of boost tuples with SOCI c++ database access library
- OCI (Oracle Call Interface) linkage errors - visual studio 2012
- SOCI Session Sql return Values
- How to code for SELECT * with SOCI?
- Cmake unable to find PostgreSQL libraries When compiling SOCI
- Problems with SOCI
- How to build SOCI with PostgreSQL?
- Need help connecting MSSQL via Soci
- Differences between OTL and SOCI
- SOCI Cannot prepare statement
- soci does not always return the same type for a NUMERIC column
- C++ querying through Soci doesn't work on computer that is not the owner
Related Questions in OTL
- When use Change Notification interface, the ORA-24912: Listener thread failed. Listen failed error occur?
- On MainForm closure OTL threads do not close
- Insert data into mysql table from c++ program using OTL library
- C++ MySQL OTL Getting Started. ODBC Configuration & Errors
- When passing gmock object as reference the setup expectations doesnt match
- Trouble getting OTL connecting to MySQL
- OTL library - SQL Server - C++ - Performance
- Cannot resolve Symbol otl_connect (otl_connect class not including)
- Differences between OTL and SOCI
- Delphi - OTL - Communicating between ThreadPool and Worker thread
- Creating NewTask in a For Loop using Omnithread Library
- Is there any methods to use "try,catch,throw in C++" in the Chromium Project Code
- Inserting binary data into Varchar2 with OTL (OCCI, OCI)
- Using OTL library (c++) to INSERT without binding parameters
- How to connect C++ to MySQL with OTL ODBC driver?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Got with the author of the OTL library. A parameterized query written in "OTL Dialect," as I'm calling it, will be passed to the underlying DB APIs as a parameterized query. So parameterized queries would be as injection safe as the underlying APIs make them.
Go to this other SO post for his full e-mail explanation: Is C++ OTL SQL database library using parameterized queries under the hood, or string concat?
Edit: SOCI uses the
soci::useexpression, which translates to the usual binding mechanism, but with more syntactic sugar. Example:db_session << "insert into table(column) values(:value_placeholder)", use(user_input,"value_placeholder");As far as DTL is concerned, I'm not sure what it do with parameters in relation to the underlying APIs.