This is a discussion on "PHP & Mysql injection in phplist" within the PHP Forum section. This forum, and the thread "PHP & Mysql injection in phplist are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
PHP & Mysql injection in phplist
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
PHP & Mysql injection in phplist
Hello all,
I want to secure a page which uses the script of "phplist". Basically this script stores username, name, surname, email etc of users in order for the company to send newsletters to their clients. Except from stripping slashes,backslashes etc or special characters, are there any other ways to prevent the data stored in the db from somenone that wants to "lay their hands" on them? Thank you! |
|
|
|
#2
|
||||
|
||||
|
Re: PHP & Mysql injection in phplist
I'm not an expert on this, so consider this more one learner trying to help another.
Regex is very powerful for validating input. It's hard as hell to learn though, although it's easier to write it than read it. There's a good editor for like $30, I think it's called Regex Buddy from JG Softwaree. And there's a great free tutorial at http://www.regular-expressions.info/php.html by Jan Goyvaerts, the guy who runs JG. He's a real class act, as far as my experiences go. I use his text editor, which is $50 although if you don't have many scruples you can use it as freeware. Of course you want to set permissions carefully for the user and give the user connection a unique password. Keep the database connection files outside the public directory. Also use some kind of encryption for member passwords. Hope this helps some, Geoff and Graham are a lot more experienced. But there are a ton of good security tips on the internet, just Google for them. Oh yes, and like anything, backup your database. |
|
#3
|
|||
|
|||
|
Re: PHP & Mysql injection in phplist
For a PHP mailing list / security ... things I would check include:
a) That you deal with inputs through stripslashes, use addslashes befor you save to a database, and use htmlspecialchars before you display. And that you quote values echoed back into forms using " characters. Correctly taking these actions should bullet proof you against injection attacks. b) Ensure that intermediate data files, backup copies of code, etc, are NOT left in web accessible directories on the server. c) Take steps to ensure that user contributed data really is contributed by the users who are who they claim to be. d) Ensure that you have good backups and also take steps to ensure that the backups aren't easily accessible / copyable by other parties. e) On a shared server, consider any possible actions by other account holders on the same server and how their actions / lack of security knowledge could effect you. f) Consider automata - programs that can browse your site / data and systematically harvest or contribute database content. Naturally, some of these may be "no brainer"s for you in your particular setup but it's worth just a moment or two's thought to each of them just in case. |
![]() |
| Tags |
| injection, phplist |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| question about validation and sql injection | sudhakararaog | PHP Forum | 5 | May 21st, 2008 14:22 |
| help with getting phplist set up | Oak | PHP Forum | 3 | May 21st, 2008 08:22 |
| SQL injection prevention | AdRock | PHP Forum | 3 | Sep 6th, 2007 13:55 |
| SQL Injection Security PHP | nate2099 | Databases | 7 | Jul 14th, 2007 13:58 |
| ohol-injection.com | rocket468 | Free Web Site Critique | 2 | Oct 27th, 2006 00:03 |