username: aa'in ('aa') or 1='1
password: ')=SHA('
its the same trick with the password, but it is not usual that you have to trick quotes AND brackets in one SQL injection. normally escaping the bracket is sufficient for SQLi.
have a look at the PHP-IDS thread, there are tons of vectors.
and you might find
this article about mysql syntax useful to harden your filters (also check the 4 examples, I guess they'll work too). the problem is, that you can use as many comparisons, variables, constants, brackets, prefixes, whitespaces, mathematics (and so on) as you like and build complex "or 1=1" injections. also note, as the above vectors have shown that you dont need the "or" operator neccessarely since you can make direct comparisons:
select * from users where name='1'='1' and pass='1'='1'
what I dont like about your test page is, that it is
a) quoted query only (most vectors happen to be an integer (e.g. an ID) and no quotes are required)
b) only auth bypass
c) you need to break parenthesis and you normally dont need to. that breaks half of the vectors because you filter for comment types, but wont protect customers who use queries without parenthesis
Edited 3 time(s). Last edit at 12/19/2008 05:04AM by Reiners.