Also any tips on how to read the api docs would be appeciated. I can't seem to find anything I am looking for !
[Solved] How to prevent sql injection
[Solved] How to prevent sql injection
Is there a class / method to sanitize sql. Should I sanitize everything that is passed in the admin panel as params, or is this somehow handled by cmsms automatically?
Also any tips on how to read the api docs would be appeciated. I can't seem to find anything I am looking for !
Also any tips on how to read the api docs would be appeciated. I can't seem to find anything I am looking for !
Last edited by jeverd01 on Mon Feb 14, 2011 3:18 am, edited 1 time in total.
Re: How to prevent sql injection
I see that adodb lite is used. Does this sanitize data when execute is ran? I can't seem to find the answer to this in the docs.
Re: How to prevent sql injection
Look at an existing module's <module>.module.php. Look at the SetParameters() function. This allows you to restrict which parameters are used, and tell CMSMS the type, i.e. CLEAN_INT, CLEAN_STRING.. If the parameter doesn't match your criteria, it will be removed.

