<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sun, 19 May 2013 21:49:37 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPMaster.com: Password Hashing In PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/19031</guid>
      <link>http://www.phpdeveloper.org/news/19031</link>
      <description><![CDATA[<p>
On PHPMaster.com there's a new tutorial that wants to help you keep your application and users a bit safer - a <a href="http://phpmaster.com/password-hashing-in-php/">guide to password hashing</a> for PHP applications.
</p>
<blockquote>
You must always think about security. If passwords are stored in plain text, what happens if an attacker gains access to your database? He can easily read all of the users' passwords. That's why we use a technique called password hashing to prevent attackers from getting user passwords. In this article you'll learn how to store the passwords securely in the database so that, even if your database falls into wrong hands, no damage will be done.
</blockquote>
<p>
He starts off describing what password hashing is and why it's important (and better than it's plain-text alternative). He gives some examples of using some of the built-in hashing functions PHP has to offer to generate the hashes. He starts with <a href="http://php.net/md5">md5</a>/<a href="http://php.net/sha1">sha1</a> (note, these are <b>not recommended</b>) but moves into more effective options like sha256, salted hashing and even bcrypting passwords with <a href="http://php.net/crypt">crypt</a>.
</p>
<p>
Be sure to check out the comments for other security concerns and links to suggested tools and resources.
</p>]]></description>
      <pubDate>Mon, 14 Jan 2013 11:57:32 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Sameer Borate's Blog: Checking your site for malicious changes]]></title>
      <guid>http://www.phpdeveloper.org/news/16693</guid>
      <link>http://www.phpdeveloper.org/news/16693</link>
      <description><![CDATA[<p>
<i>Sameer Borate</i>, in the wake of having security issues with his site, has <a href="http://www.codediesel.com/security/checking-your-site-for-malicious-changes">posted a hint</a> you could use to help detect when something has changed in important files in your application by checking their hash.
</p>
<blockquote>
Today a couple of hours back my site got compromised. Not much changes to the code, but the .htacces was changed and some code [...] was added to the .htaccess file, which redirected the traffic coming from search engines to a malware site. It has now been removed and to prevent any such changes to the .htaccess file in the future, I've written a small php script that compares the hash (SHA1) of the two major files that usually get compromised and compare them to the one originally stored. 
</blockquote>
<p>
It's not a preventative measure by any means, but it can help you keep track of if something's changed. Several issues have popped up in the major blogging engines that allow for changes to be made directly to files. These changes result in the <a href="http://php.net/sha1_file">sha hash</a> to be different and can be used to trigger a security alert. His sample code shows a basic call to <a href="http://php.net/mail">mail</a> an alert, but it could be as complex as you'd like (possibly even logging to a database or the like).
</p>]]></description>
      <pubDate>Tue, 09 Aug 2011 10:04:25 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: User Management Explained: Overview]]></title>
      <guid>http://www.phpdeveloper.org/news/11419</guid>
      <link>http://www.phpdeveloper.org/news/11419</link>
      <description><![CDATA[<p>
On DevShed there's a <a href="http://www.devshed.com/c/a/PHP/User-Management-Explained-Overview/">new tutorial</a> looking at user management in a PHP application including looks at data validation and encrypting passwords.
</p>
<blockquote>
In this article we will look at how to create a secure user management module. No user authentication or user management script can ever be one hundred percent secure, but we can try to use the tools that are available to us to their maximum, and thereby make it difficult for malicious users to hack our scripts.
</blockquote>
<p>
They include example scripts showing how to validate user input - length, alpha, empty or not and if its numeric or not. They look at encryption with the sha1() technique, comparing the user's input, hashed, to the key already stored.
</p>]]></description>
      <pubDate>Mon, 17 Nov 2008 16:03:53 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Paul Reinheimer's Blog: Improving See Also]]></title>
      <guid>http://www.phpdeveloper.org/news/10773</guid>
      <link>http://www.phpdeveloper.org/news/10773</link>
      <description><![CDATA[<p>
<i>Paul Reinheimer</i> has <a href="http://blog.preinheimer.com/index.php?/archives/275-Improving-See-Also.html">a suggestion</a> on how to improve the PHP manual to be an even better resource - enhancing the "see also".
</p>
<blockquote>
Something I'd like to see in PHP is a little more in the See Also section. They're pretty good, but it's not quite as spider-web like as I'd like. For example, yesterday I added a few links from md5() and sha1() to hash(). Lot of people know about md5() and sha1() within PHP, but I find hash() is rather unknown overall, which is a pity as it exposes a tone of different hashing algorithms.
</blockquote>
<p>
You can see an example of his updates in the <a href="http://docs.php.net/md5">md5 manual page</a> linking it to sha1_file, crc32, sha1 and the hash functions.
</p>]]></description>
      <pubDate>Wed, 06 Aug 2008 10:26:42 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jonathan Street's Blog: Random thoughts on random strings]]></title>
      <guid>http://www.phpdeveloper.org/news/10535</guid>
      <link>http://www.phpdeveloper.org/news/10535</link>
      <description><![CDATA[<p>
On his blog, <i>Jonathan Street</i> has <a href="http://torrentialwebdev.com/blog/archives/157-Random-thoughts-on-random-strings.html">posted some "random thoughts"</a> on generating random (or not so random) strings in PHP.
</p>
<blockquote>
Humans are astoundingly bad at being random and I just slapped the keyboard a few times until I felt I had the required 16 characters. Writing some code to produce a fairly random string is incredibly easy. I've easily done it a dozen times or more. Though only because it is easier to re-write it than to find where I put the last one
</blockquote>
<p>
He gives two examples that work, but aren't the best possibilities for making truly random strings - one using mt_rand to select a random character from a string and the other using the same idea but instead using the char() function to replace the string of characters.
</p>
<p>
His other examples include the use of the uniqid function with the more_entropy setting enabled and an md5 or sha1 hash (for which he gives positives and negtives).
</p>]]></description>
      <pubDate>Thu, 03 Jul 2008 07:58:33 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ryan Malesevich's Blog: MD5 to SHA-1 in PHP and MySQL (Part 1)]]></title>
      <guid>http://www.phpdeveloper.org/news/6397</guid>
      <link>http://www.phpdeveloper.org/news/6397</link>
      <description><![CDATA[<p>
<i>Ryan Malesevich</i> is taking a break from his look at some handy WordPress packages to share a small series on how to move from using MD5 hashes out to SHA-1 hashes for passwords in a MySQL database. He's posted <a href="http://ryanslife.net/2006/10/01/md5-to-sha-1-in-php-and-mysql-part-1/">part one</a> today.
</p>
<blockquote>
What if you're using MD5 in your web application and want to switch over to another encryption method. It's actually not that hard and I plan to cover them in this multi-part tutorial (I know I planned on writing this months ago, but it's better late then never). In this first part I plan on going over updating the database structure and a 'pseudo-code' of what will need to be done.
</blockquote>
<p>
As mentioned, he <a href="http://ryanslife.net/2006/10/01/md5-to-sha-1-in-php-and-mysql-part-1/">gives the outline</a> (pseudo-code) of how the process will work - basically, creating an SHA1 hash of the MD5 and the username in a "newpassword" column added to your database.
</p>]]></description>
      <pubDate>Mon, 02 Oct 2006 09:31:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPit.net: Handling passwords safely in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/4800</guid>
      <link>http://www.phpdeveloper.org/news/4800</link>
      <description><![CDATA[PHPit.net is back today with <a href="http://www.phpit.net/article/handling-passwords-safely-php/">another new tutorial</a> - this time it concerns the safe handling of passwords in your PHP scripts.
<p>
<quote>
<i>
If you're ever going to create a script that involves users or passwords, which is very likely, you'll probably run across security issues with handling the passwords. You can't just store the passwords in clear text in your database, and great care must be used when managing the passwords (for example during login).
<p>
In this article I will show you everything that you have to think about when handling passwords in PHP, and how to solve some common problems.
</i>
</quote>
<p>
They <a href="http://www.phpit.net/article/handling-passwords-safely-php/">offer suggestions</a> like storying them hashed (md5 or sha1), protecting them with a salt, SSL certificates, and how to manage their use with things like cookies and sessions.]]></description>
      <pubDate>Mon, 06 Feb 2006 07:17:10 -0600</pubDate>
    </item>
  </channel>
</rss>
