Set up a dummy mysql user that does not have any rights outside of thier table, and store real users encrypted passwords in the table. Have the real password be some random variation of what the users set, and then use the pasword that the users set as the encryption key for the password in the database. You can use something like blowfish to encrypt it. By randomizing their password, you can adjust/verify the password length. That along with strong encrypton, even if some one could get the encrypted password from the database, they would have a very difficult time decrypting them. If that is not secure enough you could use 3DES + blowfish to doulble encrypt the password.....


This is what I would do anyway, because it is simple but effective.

In reply to Re: Secure way to pass database connection info from mod_perl handler to CGI script by doowah2004
in thread Secure way to pass database connection info from mod_perl handler to CGI script by sgifford

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.