Jump to content

How safe is script in admin folder with database logins?


simberak

Recommended Posts

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...