![]() |
|
|
#1 |
|
Архивный участник
Join Date: Nov 2006
Posts: 204
|
hi,
i dont really like the PHP registration forms that are out there (l2cp mainly ) so i started writing my own ( np there ) now i was just wondering on how to defend myself against SQL-injection i had 2 ideas and just wondering what i would do best. 1) the hard way: parse the variables one by one and filter out ',", ,-,;,,, and all the other stuff or just 2) make some regex's that only allow [:alpha:],[:num:] and mayb[:space:] i personally think that if you only allow the alphanum and the numeric chars then all other chars used for sql-injection are basicly out of the picture.. just cut off at 16chars but i'm not sure if i'm looking at it too easy.. any help on this would be nice |
|
|
|
|