|
|
#1 (permalink) |
|
Guest
Posts: n/a
|
In the anime recommendations section 'search by title', I noticed that if you enter a title in that has leading or ending spaces (such as 'scryed ') then you won't get any search results.
There is a simple way to fix this. I suggest using the PHP function trim() after the user has submitted the title. You would only have to add: $_POST['series'] = trim($_POST['series']); http://anidb.ath.cx/ is guilty of this too. Their search form doesn't trim leading and trailing whitespace either. I think they use PERL, but it's probably not hard to fix either. |
|
|
|
#2 (permalink) |
|
Overlord
Join Date: May 2002
Location: Seattle, Washington
Age: 32
Posts: 15,691
|
...
wow, thanks for pointing out that blazing sql injection attack possibility... i use trim/strip_tags/addslashes basically for any post/get variable, but i somehow managed to miss it on that one only! *kicks self*... it should be fixed now ^_^
__________________
![]() Anime-Planet.com - anime | manga | reviews Adding Anime - Synopsis Templates | Twitter | MySpace [sixth sense voice] I SEE BRITISH PEOPLE - Control my signature or avatar!
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|