Forum Moderators: coopster
exec("/usr/bin/htpasswd -b /etc/myservice/service_passwd ".escapeshellcmd($row[0])." ".escapeshellcmd($row[1]));
However, I have another machine that I need to provide proxy access on...a different server so I need to drag usernames from the remote database.
I therefore created a public MySql database but it only has one table in it with usernames. I realise this is slightly insecure but I have no alternative. So, whilst I can run security checks on this database I also need to escape the input in case someone puts SQL injection into it.