Commit 65a62024b8533c90b82c2320fcb73b410a3b0969

Authored by nbm
1 parent 5de73ae1

Make sure the userID in the session gives us a valid user, and specify

the basic errorPage function.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3690 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 10 additions and 0 deletions
lib/dispatcher.inc.php
... ... @@ -75,6 +75,11 @@ class KTStandardDispatcher extends KTDispatcher {
75 75 $this->permissionDenied();
76 76 exit(0);
77 77 }
  78 + $this->oUser =& User::get($_SESSION['userID']);
  79 + if (PEAR::isError($this->oUser) || ($this->oUser === false)) {
  80 + $this->permissionDenied();
  81 + exit(0);
  82 + }
78 83 }
79 84  
80 85 if ($bAdminRequired !== false) {
... ... @@ -102,6 +107,11 @@ class KTStandardDispatcher extends KTDispatcher {
102 107 $main->setCentralPayload($data);
103 108 $main->render();
104 109 }
  110 +
  111 + function errorPage($errorMessage) {
  112 + $this->handleOutput($errorMessage);
  113 + exit(0);
  114 + }
105 115 }
106 116  
107 117 class KTAdminDispatcher extends KTStandardDispatcher {
... ...