Re: Is header() malfunction due to PHP5.3.3 -> 5.4.11 transition?
| From: | Adam Richardson | Date: | Sun, 10 Feb 2013 02:47:44 +0000 |
| Subject: | Re: Is header() malfunction due to PHP5.3.3 -> 5.4.11 transition? | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-65745@lists.php.net to get a copy of this message | ||
On Sat, Feb 9, 2013 at 3:59 PM, Tedd Sperling <tedd@sperling.com> wrote:
> On Feb 9, 2013, at 2:00 PM, Jonathan Eagle <jeofva@attglobal.net> wrote:
> Jonathan:
>
> No offense to your routine, but you may want to review this:
>
> http://sperling.com/php/authorization/log-on.php
>
> If anyone finds an error, please post.
>
After successfully logging in, the session id should be regenerated to
prevent session fixation:
http://php.net/manual/en/function.session-regenerate-id.php
http://shiflett.org/articles/session-fixation
Requests should be sent over https to prevent session hijacking (if you'd
rather avoid paying for a cert for your site, you could just document this):
http://stackoverflow.com/questions/22880/what-is-the-best-way-to-prevent-session-hijacking
http://php.net/manual/en/function.session-set-cookie-params.php
Even though this isn't a big deal for an example that only makes use of one
password, and that password isn't likely one that you reuse anywhere else,
for the sake of educating the masses, salting the password would be a nice
addition:
https://github.com/ircmaxell/password_compat
https://gist.github.com/nikic/3707231
Adam
--
Nephtali: A simple, flexible, fast, and security-focused PHP framework
http://nephtaliproject.com