]> git.evergreen-ils.org Git - working/Evergreen.git/commit
In searchWHERE(): plugged a security hole that invited SQL injection.
authorscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 12 Mar 2009 18:35:05 +0000 (18:35 +0000)
committerscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 12 Mar 2009 18:35:05 +0000 (18:35 +0000)
commit1327e8ca83fbb1730273485ecc2b685354a2cc5a
tree5330705d1cc8e7c447cea9415eea66efc1198789
parent81b916dfcdb9d98792c3b47cfbfb9c6308199a83
In searchWHERE(): plugged a security hole that invited SQL injection.

The use of a leading plus sign was originally intended to allow
references to boolean columns in a WHERE clause, without requiring
an explicit comparison to true or false.  E.g. "WHERE col" instead
of the more prosaic "WHERE col = TRUE".

However the old code worked by simply concatenating unsanitized
strings, leaving the door open for SQL injection.

The new code attempts to verify that the last string to be appended
looks like an SQL identifier, with no extra SQL syntax.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@12499 dcc99617-32d9-48b4-a31d-7c20da2025e4
Open-ILS/src/c-apps/oils_cstore.c