note 68672 added to function.posix-getpwnam

From: Date: Sun, 06 Aug 2006 13:50:52 +0000
Subject: note 68672 added to function.posix-getpwnam
Groups: php.notes 
Request: Send a blank email to php-notes+get-115592@lists.php.net to get a copy of this message
Okay, this is a DIRTY HACK that I came up with I am not a regular coder, so please weigh the relevant security considerations <?php $cmdstr = 'echo ' . $_POST['user'] . ' ' . $_POST['pass']; $cmdstr .= ' | /home/didar/pam_auth -n common-auth '; exec($cmdstr,$read); if (strstr($read[0],"OK")) { echo "Success"; } else { echo "Failed"; } ?> The code above makes use of the "pam_auth" or "squid_pam_auth" helper program from Squid package. Go to the following link for more information about it - http://devel.squid-cache.org/hno/pam_auth-2.0.txt WARNING: This is simply a hack. Always USE SSL/TLS in the orignating submit form. Also, always do sanity checks on the user input data. ---- Server IP: 203.199.107.94 Probable Submitter: 203.187.210.5 (proxied: 203.187.210.5) ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.posix-getpwnam.php Edit -- https://master.php.net/note/edit/68672 Del: integrated -- https://master.php.net/note/delete/68672/integrated Del: useless -- https://master.php.net/note/delete/68672/useless Del: bad code -- https://master.php.net/note/delete/68672/bad+code Del: spam -- https://master.php.net/note/delete/68672/spam Del: non-english -- https://master.php.net/note/delete/68672/non-english Del: in docs -- https://master.php.net/note/delete/68672/in+docs Del: other reasons-- https://master.php.net/note/delete/68672 Reject -- https://master.php.net/note/reject/68672 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#115592) next »