Since everyone's answered the question about the taint, I figured I'd mention one thing that jumped out at me immediately: the fact that you are using the email address right from the Param in a SQL Query without sanity-checking it to ensure it's a valid email address.
That's a potentially big security hole, especially when combined with using 'LIKE' in your SQL statement to return matching records. Queries with 'LIKE' perform wildcard matching. If I was Mr. Bad Cracker I could pass your script an email along the lines of *hotmail.com and get back all records for everyone with a Hotmail account.
Granted you are sending the password to an email address, so it's not immediately insecure, but a determined cracker could use this to get a passwords from your site.
Instead of using 'LIKE' (which is also a performance hit since it has to do the wildcard-matching), I would suggest that you canonicalize on uppercasing or lowercasing all entries in your database and do the same to each email address your given, and use '=' in your SQL query. That way, the database can only return one record, and wildcards are treated as literal characters. And as I said before, always always make sure that it's a valid email address you've been given before you even perform your query.
Cheers,
Maurice
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.