diff options
author | Brion Vibber <brion@pobox.com> | 2010-02-12 15:24:15 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-02-12 15:24:15 -0800 |
commit | 38f42d56bc5f2871d69d1df066a1f1d76e7cbc68 (patch) | |
tree | c079bee1d1de8989c0ebcd7383f50f665f113035 | |
parent | 506c2d7491f7f229a1469ef176fee6c21d61a6c6 (diff) |
Session fix for PHP 5.3 configurations where cookies are excluded from $_REQUEST via request_order in php.ini (Fedora 12, MacPorts known to be affected)
-rw-r--r-- | lib/util.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/util.php b/lib/util.php index a07fe49e3..209dc2254 100644 --- a/lib/util.php +++ b/lib/util.php @@ -367,7 +367,8 @@ function common_current_user() if ($_cur === false) { - if (isset($_REQUEST[session_name()]) || (isset($_SESSION['userid']) && $_SESSION['userid'])) { + if (isset($_COOKIE[session_name()]) || isset($_GET[session_name()]) + || (isset($_SESSION['userid']) && $_SESSION['userid'])) { common_ensure_session(); $id = isset($_SESSION['userid']) ? $_SESSION['userid'] : false; if ($id) { |