simberak Posted August 23, 2016 Share Posted August 23, 2016 Hello, I would like to find out if the cron script is safe in root/admin/next-folder if it includes database logins? Like: <?php $link = mysql_connect('localhost', 'user', 'password'); if (!$link) { die('No connection possible: ' . mysql_error()); } THE SCRIPT ?> Thank you for discussion, Daniel Link to comment Share on other sites More sharing options...
vekia Posted August 23, 2016 Share Posted August 23, 2016 you can do it in that way, that is not a problem and it should not affect security as long as you will not write bad cod (for example with possibility to make a sql injection) it will be much better to include prestashop init library there and use DB::Static methods to make sql queries Link to comment Share on other sites More sharing options...
simberak Posted August 29, 2016 Author Share Posted August 29, 2016 So I can include there just the script? Vekia: I am not a programmer and dont know what exactly is a sql injection But the code is about that visibility for out of stock products we discussed by mails And about that PS library and DB::Static methods, can you be more specific for me? As I mentioned, I dont know too much about it Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now