- Timestamp:
- 2014-03-14T22:46:25+13:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/runtime-src/src/recpt/securitytools.cpp
r28898 r28899 136 136 } 137 137 138 139 text_t encodeForMySQL(const text_t& in, const text_t& immuneChars, const SQLMode mode) { 140 text_t out; 141 text_t::const_iterator here = in.begin(); 142 text_t::const_iterator end = in.end(); 143 while (here != end) { 144 out += encodeForMySQL(immuneChars, *here, mode); // IMMUNE_SQL and STANDARD SQLMode by default 138 text_t encodeForSQL(const text_t& in, const text_t& immuneChars, const SQLMode mode) { 139 text_t out; 140 text_t::const_iterator here = in.begin(); 141 text_t::const_iterator end = in.end(); 142 while (here != end) { 143 out += encodeForSQL(immuneChars, *here, mode); // IMMUNE_SQL and STANDARD SQLMode by default 145 144 ++here; 146 145 } … … 320 319 321 320 /* 321 322 C++ port of OWASP-ESAPI for MySQL. Not sure if this is is the same for SQLite 323 322 324 http://code.google.com/p/owasp-esapi-java/source/browse/trunk/src/main/java/org/owasp/esapi/codecs/MySQLCodec.java 323 325 Defense Option 3 of https://www.owasp.org/index.php/SQL_Injection_Prevention_Cheat_Sheet … … 335 337 336 338 */ 337 text_t encodeFor MySQL(const text_t& immuneChars, const unsigned short in, const SQLMode mode) {339 text_t encodeForSQL(const text_t& immuneChars, const unsigned short in, const SQLMode mode) { 338 340 339 341 text_t result = ""; … … 392 394 } 393 395 396 // Unused at present. 394 397 // See Codec.hex[] initialization and Codec.getHexForNonAlphanumeric(c) and Codec.toHex(c) 395 398 // http://code.google.com/p/owasp-esapi-java/source/browse/trunk/src/main/java/org/owasp/esapi/codecs/Codec.java
Note:
See TracChangeset
for help on using the changeset viewer.