Skip to content

Commit

Permalink
Two unchecked session variables (authorized, lang) now have more para…
Browse files Browse the repository at this point in the history
…noid checking
  • Loading branch information
rickofullsail committed Jun 3, 2011
1 parent 458db7e commit 4908bf1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Binary file added framework5/.DS_Store
Binary file not shown.
Binary file added framework5/wddsocial/.DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions framework5/wddsocial/controller/UserSession.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public static function is_current($userID) {


public static function is_authorized() { public static function is_authorized() {
static::session_started(); static::session_started();
if ($_SESSION['authorized'] and isset($_SESSION['user'])) return true; if (isset($_SESSION['authorized']) and isset($_SESSION['user']) and is_bool($_SESSION['authorized']) and $_SESSION['authorized']) return true;
else return false; else return false;
} }


Expand Down Expand Up @@ -281,7 +281,7 @@ public static function user_lang() {




public static function visitor_lang() { public static function visitor_lang() {
if (set($_SESSION['lang'])) return $_SESSION['lang']; if (isset($_SESSION['lang'])) return $_SESSION['lang'];
else return 'en'; else return 'en';
} }


Expand Down

0 comments on commit 4908bf1

Please sign in to comment.