joshsackett (joshsackett@gmail.com) writes:[color=blue]
> For instance:
> @string = ' or 1=1)--
> @pwdstring = blank (becomes @pwdstring = 55-12-567-3244-123 due to
> encryption)
>
> select * from users where (userid='' or 1=1)--') and
> password='55-12-567-3244-123' WORKS OK
> select * from permissions where userid='' or 1=1)--' DOES NOT WORK
>
> Is this an instance where the original developers made a happy coding
> error (I asked and preventing injection attacks wasn't intended) or is
> there something I can do to circumvent this?[/color]
I am afraid that I don't understand. There may or may not be a string
that can be used for both queries, but both of them are open to SQL
injection, and that's bad enough. You make it like SQL injection is a
desired feature, but find it difficult to understand such requirements.
--
Erland Sommarskog, SQL Server MVP,
esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp