Commit b2dd388200ecf12a145a02079329e14fa296b481

Authored by kevin_fourie
1 parent 8d324339

Merged in from DEV trunk...

KTC-463
"Path Issues in KnowledgeTree (LDAP and File Upload problems)"
Fixed. Added a check to ensure path is absolute.

Committed by: Megan Watson
Reviewed by: Conrad Vermeulen




git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/branches/3.5.2c-Release-Branch@8409 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/authentication/authenticationproviderregistry.inc.php
@@ -85,7 +85,11 @@ class KTAuthenticationProviderRegistry { @@ -85,7 +85,11 @@ class KTAuthenticationProviderRegistry {
85 $sClass = $aInfo[1]; 85 $sClass = $aInfo[1];
86 $sPath = $aInfo[3]; 86 $sPath = $aInfo[3];
87 if ($sPath) { 87 if ($sPath) {
88 - require_once($sPath); 88 + $sPath = (KTUtil::isAbsolutePath($sPath)) ? $sPath : KT_DIR .'/'. $sPath;
  89 + include_once($sPath);
  90 + }
  91 + if(!class_exists($sClass)){
  92 + return PEAR::raiseError(_kt('Authentication provider class does not exist. '.$sClass));
89 } 93 }
90 $oProvider =new $sClass; 94 $oProvider =new $sClass;
91 $this->_aAuthenticationProviders[$nsname] =& $oProvider; 95 $this->_aAuthenticationProviders[$nsname] =& $oProvider;