sql injection worked on a own script...
Posted: Thu Aug 18, 2022 10:20 am
Hi All
i'm trying to figure out the best / savest way to process a $_GET / $_POST variable in a query. The Parameter is a string so i cannot make it integer only.
I saw a few places where used
Text::input or Text:prepare
at the moment i use:
is there a better way to go?
unfortunately i had a attack which i saw in the logs....so now i try to fix every hole...
the fix i tried tep_db_input(Text::input( seems to help for this particular injection but i'm not sure if this is the best way, thanks in advance
i'm trying to figure out the best / savest way to process a $_GET / $_POST variable in a query. The Parameter is a string so i cannot make it integer only.
I saw a few places where used
Text::input or Text:prepare
at the moment i use:
Code: Select all
...AND attribute_id = '" . tep_db_input(Text::input($_POST['active_field_id'])) . "'' ....unfortunately i had a attack which i saw in the logs....so now i try to fix every hole...
Code: Select all
SELECT products_id, count(*) as count_fulfilled FROM techspecs_value WHERE (group_id IN (if(now()=sysdate(),sleep(15),0)) AND (attribute_id = 'B168_M168_ZUSATZFUNKTIONEN' AND attribute_value_text = 'Bluetooth') ) GROUP BY products_id;