mirror of
https://github.com/moodle/moodle.git
synced 2025-04-19 07:25:30 +02:00
auth cas: MDL-20029 upgrade phpCAS version to the latest available version
Also make sure phpCAS doesn't try to start a new PHP session. We have already started our own and want to keep it :). In addition to it, it emitted a PHP notice that could block the authentication process under certain configurations. And pretty much the same with the wantsurl and loginguest checks.
This commit is contained in:
parent
6fbaf7f8b8
commit
389d6f72b8
2285
auth/cas/CAS/CAS.php
2285
auth/cas/CAS/CAS.php
File diff suppressed because it is too large
Load Diff
@ -1,568 +1,190 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
|
||||
* @file CAS/PGTStorage/pgt-db.php
|
||||
|
||||
|
||||
* Basic class for PGT database storage
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// include phpDB library (the test was introduced in release 0.4.8 for
|
||||
|
||||
|
||||
// the integration into Tikiwiki).
|
||||
|
||||
|
||||
if (!class_exists('DB')) {
|
||||
|
||||
|
||||
@include_once('DB.php');
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
|
||||
* @class PGTStorageDB
|
||||
|
||||
|
||||
* The PGTStorageDB class is a class for PGT database storage. An instance of
|
||||
|
||||
|
||||
* this class is returned by CASClient::SetPGTStorageDB().
|
||||
|
||||
|
||||
*
|
||||
|
||||
|
||||
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
|
||||
|
||||
|
||||
*
|
||||
|
||||
|
||||
* @ingroup internalPGTStorageDB
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class PGTStorageDB extends PGTStorage
|
||||
|
||||
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
|
||||
|
||||
* @addtogroup internalPGTStorageDB
|
||||
|
||||
|
||||
* @{
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
|
||||
* a string representing a PEAR DB URL to connect to the database. Written by
|
||||
|
||||
|
||||
* PGTStorageDB::PGTStorageDB(), read by getURL().
|
||||
|
||||
|
||||
*
|
||||
|
||||
|
||||
* @hideinitializer
|
||||
|
||||
|
||||
* @private
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
var $_url='';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
|
||||
* This method returns the PEAR DB URL to use to connect to the database.
|
||||
|
||||
|
||||
*
|
||||
|
||||
|
||||
* @return a PEAR DB URL
|
||||
|
||||
|
||||
*
|
||||
|
||||
|
||||
* @private
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
function getURL()
|
||||
|
||||
|
||||
{
|
||||
|
||||
|
||||
return $this->_url;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
|
||||
* The handle of the connection to the database where PGT's are stored. Written by
|
||||
|
||||
|
||||
* PGTStorageDB::init(), read by getLink().
|
||||
|
||||
|
||||
*
|
||||
|
||||
|
||||
* @hideinitializer
|
||||
|
||||
|
||||
* @private
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
var $_link = null;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
|
||||
* This method returns the handle of the connection to the database where PGT's are
|
||||
|
||||
|
||||
* stored.
|
||||
|
||||
|
||||
*
|
||||
|
||||
|
||||
* @return a handle of connection.
|
||||
|
||||
|
||||
*
|
||||
|
||||
|
||||
* @private
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
function getLink()
|
||||
|
||||
|
||||
{
|
||||
|
||||
|
||||
return $this->_link;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
|
||||
* The name of the table where PGT's are stored. Written by
|
||||
|
||||
|
||||
* PGTStorageDB::PGTStorageDB(), read by getTable().
|
||||
|
||||
|
||||
*
|
||||
|
||||
|
||||
* @hideinitializer
|
||||
|
||||
|
||||
* @private
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
var $_table = '';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
|
||||
* This method returns the name of the table where PGT's are stored.
|
||||
|
||||
|
||||
*
|
||||
|
||||
|
||||
* @return the name of a table.
|
||||
|
||||
|
||||
*
|
||||
|
||||
|
||||
* @private
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
function getTable()
|
||||
|
||||
|
||||
{
|
||||
|
||||
|
||||
return $this->_table;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// ########################################################################
|
||||
|
||||
|
||||
// DEBUGGING
|
||||
|
||||
|
||||
// ########################################################################
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
|
||||
* This method returns an informational string giving the type of storage
|
||||
|
||||
|
||||
* used by the object (used for debugging purposes).
|
||||
|
||||
|
||||
*
|
||||
|
||||
|
||||
* @return an informational string.
|
||||
|
||||
|
||||
* @public
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
function getStorageType()
|
||||
|
||||
|
||||
{
|
||||
|
||||
|
||||
return "database";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
|
||||
* This method returns an informational string giving informations on the
|
||||
|
||||
|
||||
* parameters of the storage.(used for debugging purposes).
|
||||
|
||||
|
||||
*
|
||||
|
||||
|
||||
* @public
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
function getStorageInfo()
|
||||
|
||||
|
||||
{
|
||||
|
||||
|
||||
return 'url=`'.$this->getURL().'\', table=`'.$this->getTable().'\'';
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// ########################################################################
|
||||
|
||||
|
||||
// CONSTRUCTOR
|
||||
|
||||
|
||||
// ########################################################################
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
|
||||
* The class constructor, called by CASClient::SetPGTStorageDB().
|
||||
|
||||
|
||||
*
|
||||
|
||||
|
||||
* @param $cas_parent the CASClient instance that creates the object.
|
||||
|
||||
|
||||
* @param $user the user to access the data with
|
||||
|
||||
|
||||
* @param $password the user's password
|
||||
|
||||
|
||||
* @param $database_type the type of the database hosting the data
|
||||
|
||||
|
||||
* @param $hostname the server hosting the database
|
||||
|
||||
|
||||
* @param $port the port the server is listening on
|
||||
|
||||
|
||||
* @param $database the name of the database
|
||||
|
||||
|
||||
* @param $table the name of the table storing the data
|
||||
|
||||
|
||||
*
|
||||
|
||||
|
||||
* @public
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
function PGTStorageDB($cas_parent,$user,$password,$database_type,$hostname,$port,$database,$table)
|
||||
|
||||
|
||||
{
|
||||
|
||||
|
||||
phpCAS::traceBegin();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// call the ancestor's constructor
|
||||
|
||||
|
||||
$this->PGTStorage($cas_parent);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if ( empty($database_type) ) $database_type = CAS_PGT_STORAGE_DB_DEFAULT_DATABASE_TYPE;
|
||||
|
||||
|
||||
if ( empty($hostname) ) $hostname = CAS_PGT_STORAGE_DB_DEFAULT_HOSTNAME;
|
||||
|
||||
|
||||
if ( $port==0 ) $port = CAS_PGT_STORAGE_DB_DEFAULT_PORT;
|
||||
|
||||
|
||||
if ( empty($database) ) $database = CAS_PGT_STORAGE_DB_DEFAULT_DATABASE;
|
||||
|
||||
|
||||
if ( empty($table) ) $table = CAS_PGT_STORAGE_DB_DEFAULT_TABLE;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// build and store the PEAR DB URL
|
||||
|
||||
|
||||
$this->_url = $database_type.':'.'//'.$user.':'.$password.'@'.$hostname.':'.$port.'/'.$database;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// XXX should use setURL and setTable
|
||||
|
||||
|
||||
phpCAS::traceEnd();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// ########################################################################
|
||||
|
||||
|
||||
// INITIALIZATION
|
||||
|
||||
|
||||
// ########################################################################
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
|
||||
* This method is used to initialize the storage. Halts on error.
|
||||
|
||||
|
||||
*
|
||||
|
||||
|
||||
* @public
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
function init()
|
||||
|
||||
|
||||
{
|
||||
|
||||
|
||||
phpCAS::traceBegin();
|
||||
|
||||
|
||||
// if the storage has already been initialized, return immediatly
|
||||
|
||||
|
||||
if ( $this->isInitialized() )
|
||||
|
||||
|
||||
return;
|
||||
|
||||
|
||||
return;
|
||||
// call the ancestor's method (mark as initialized)
|
||||
|
||||
|
||||
parent::init();
|
||||
|
||||
|
||||
|
||||
|
||||
//include phpDB library (the test was introduced in release 0.4.8 for
|
||||
//the integration into Tikiwiki).
|
||||
if (!class_exists('DB')) {
|
||||
include_once('DB.php');
|
||||
}
|
||||
|
||||
// try to connect to the database
|
||||
|
||||
|
||||
$this->_link = DB::connect($this->getURL());
|
||||
|
||||
|
||||
if ( DB::isError($this->_link) ) {
|
||||
|
||||
|
||||
phpCAS::error('could not connect to database ('.DB::errorMessage($this->_link).')');
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
var_dump($this->_link);
|
||||
|
||||
|
||||
phpCAS::traceBEnd();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
@ -114,15 +114,26 @@ class PGTStorageFile extends PGTStorage
|
||||
if (empty($path) ) $path = CAS_PGT_STORAGE_FILE_DEFAULT_PATH;
|
||||
|
||||
// check that the path is an absolute path
|
||||
if ( $path[0] != '/' ) {
|
||||
phpCAS::error('an absolute path is needed for PGT storage to file');
|
||||
if (getenv("OS")=="Windows_NT"){
|
||||
|
||||
if (!preg_match('`^[a-zA-Z]:`', $path)) {
|
||||
phpCAS::error('an absolute path is needed for PGT storage to file');
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if ( $path[0] != '/' ) {
|
||||
phpCAS::error('an absolute path is needed for PGT storage to file');
|
||||
}
|
||||
|
||||
// store the path (with a leading and trailing '/')
|
||||
$path = preg_replace('|[/]*$|','/',$path);
|
||||
$path = preg_replace('|^[/]*|','/',$path);
|
||||
// store the path (with a leading and trailing '/')
|
||||
$path = preg_replace('|[/]*$|','/',$path);
|
||||
$path = preg_replace('|^[/]*|','/',$path);
|
||||
}
|
||||
|
||||
$this->_path = $path;
|
||||
|
||||
// check the format and store it
|
||||
switch ($format) {
|
||||
case CAS_PGT_STORAGE_FILE_FORMAT_PLAIN:
|
||||
@ -171,7 +182,6 @@ class PGTStorageFile extends PGTStorage
|
||||
{
|
||||
phpCAS::traceBegin();
|
||||
$filename = $this->getPath().$pgt_iou.'.'.$this->getFormat();
|
||||
|
||||
phpCAS::traceEnd($filename);
|
||||
return $filename;
|
||||
}
|
||||
@ -215,7 +225,6 @@ class PGTStorageFile extends PGTStorage
|
||||
phpCAS::traceBegin();
|
||||
$pgt = FALSE;
|
||||
$fname = $this->getPGTIouFilename($pgt_iou);
|
||||
|
||||
if ( !($f=fopen($fname,"r")) ) {
|
||||
phpCAS::trace('could not open `'.$fname.'\'');
|
||||
} else {
|
||||
@ -237,4 +246,4 @@ class PGTStorageFile extends PGTStorage
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
?>
|
@ -183,7 +183,6 @@ class PGTStorage
|
||||
|
||||
// include specific PGT storage classes
|
||||
include_once(dirname(__FILE__).'/pgt-file.php');
|
||||
// incompatibility with Moodle
|
||||
//include_once(dirname(__FILE__).'/pgt-db.php');
|
||||
include_once(dirname(__FILE__).'/pgt-db.php');
|
||||
|
||||
?>
|
||||
?>
|
2672
auth/cas/CAS/CAS/client.php
Normal file
2672
auth/cas/CAS/CAS/client.php
Normal file
File diff suppressed because it is too large
Load Diff
@ -10,7 +10,7 @@
|
||||
require_once('domxml-php4-to-php5.php');
|
||||
}
|
||||
|
||||
Version 1.20a, 2008-11-06, http://alexandre.alapetite.net/doc-alex/domxml-php4-php5/
|
||||
Version 1.21, 2008-12-05, http://alexandre.alapetite.net/doc-alex/domxml-php4-php5/
|
||||
|
||||
------------------------------------------------------------------
|
||||
Written by Alexandre Alapetite, http://alexandre.alapetite.net/cv/
|
||||
@ -179,6 +179,7 @@ class php4DOMDocument extends php4DOMNode
|
||||
}
|
||||
function html_dump_mem() {return $this->myDOMNode->saveHTML();}
|
||||
function root() {return parent::_newDOMElement($this->myDOMNode->documentElement,$this);}
|
||||
function xinclude() {return $this->myDOMNode->xinclude();}
|
||||
function xpath_new_context() {return new php4DOMXPath($this);}
|
||||
}
|
||||
|
27
auth/cas/CAS/CAS/languages/catalan.php
Normal file
27
auth/cas/CAS/CAS/languages/catalan.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file languages/spanish.php
|
||||
* @author Iván-Benjamín García Torà <ivaniclixx AT gmail DOT com>
|
||||
* @sa @link internalLang Internationalization @endlink
|
||||
* @ingroup internalLang
|
||||
*/
|
||||
|
||||
$this->_strings = array(
|
||||
CAS_STR_USING_SERVER
|
||||
=> 'usant servidor',
|
||||
CAS_STR_AUTHENTICATION_WANTED
|
||||
=> 'Autentificació CAS necessària!',
|
||||
CAS_STR_LOGOUT
|
||||
=> 'Sortida de CAS necessària!',
|
||||
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
|
||||
=> 'Ja hauria d\ haver estat redireccionat al servidor CAS. Feu click <a href="%s">aquí</a> per a continuar.',
|
||||
CAS_STR_AUTHENTICATION_FAILED
|
||||
=> 'Autentificació CAS fallida!',
|
||||
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
|
||||
=> '<p>No estàs autentificat.</p><p>Pots tornar a intentar-ho fent click <a href="%s">aquí</a>.</p><p>Si el problema persisteix hauría de contactar amb l\'<a href="mailto:%s">administrador d\'aquest llocc</a>.</p>',
|
||||
CAS_STR_SERVICE_UNAVAILABLE
|
||||
=> 'El servei `<b>%s</b>\' no està disponible (<b>%s</b>).'
|
||||
);
|
||||
|
||||
?>
|
@ -1,79 +1,27 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
|
||||
* @file languages/english.php
|
||||
|
||||
|
||||
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
|
||||
|
||||
|
||||
* @sa @link internalLang Internationalization @endlink
|
||||
|
||||
|
||||
* @ingroup internalLang
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$this->_strings = array(
|
||||
|
||||
|
||||
CAS_STR_USING_SERVER
|
||||
|
||||
|
||||
=> 'using server',
|
||||
|
||||
|
||||
CAS_STR_AUTHENTICATION_WANTED
|
||||
|
||||
|
||||
=> 'CAS Authentication wanted!',
|
||||
|
||||
|
||||
CAS_STR_LOGOUT
|
||||
|
||||
|
||||
=> 'CAS logout wanted!',
|
||||
|
||||
|
||||
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
|
||||
|
||||
|
||||
=> 'You should already have been redirected to the CAS server. Click <a href="%s">here</a> to continue.',
|
||||
|
||||
|
||||
CAS_STR_AUTHENTICATION_FAILED
|
||||
|
||||
|
||||
=> 'CAS Authentication failed!',
|
||||
|
||||
|
||||
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
|
||||
|
||||
|
||||
=> '<p>You were not authenticated.</p><p>You may submit your request again by clicking <a href="%s">here</a>.</p><p>If the problem persists, you may contact <a href="mailto:%s">the administrator of this site</a>.</p>',
|
||||
|
||||
|
||||
CAS_STR_SERVICE_UNAVAILABLE
|
||||
|
||||
|
||||
=> 'The service `<b>%s</b>\' is not available (<b>%s</b>).'
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
@ -1,82 +1,28 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
|
||||
* @file languages/english.php
|
||||
|
||||
|
||||
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
|
||||
|
||||
|
||||
* @sa @link internalLang Internationalization @endlink
|
||||
|
||||
|
||||
* @ingroup internalLang
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$this->_strings = array(
|
||||
|
||||
|
||||
CAS_STR_USING_SERVER
|
||||
|
||||
|
||||
=> 'utilisant le serveur',
|
||||
|
||||
|
||||
CAS_STR_AUTHENTICATION_WANTED
|
||||
|
||||
|
||||
=> 'Authentication CAS nécessaire !',
|
||||
|
||||
|
||||
=> 'Authentication CAS n<>cessaire !',
|
||||
CAS_STR_LOGOUT
|
||||
|
||||
|
||||
=> 'Déconnexion demandée !',
|
||||
|
||||
|
||||
=> 'D<>connexion demand<6E>e !',
|
||||
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
|
||||
|
||||
|
||||
=> 'Vous auriez du etre redirigé(e) vers le serveur CAS. Cliquez <a href="%s">ici</a> pour continuer.',
|
||||
|
||||
|
||||
=> 'Vous auriez du etre redirig<69>(e) vers le serveur CAS. Cliquez <a href="%s">ici</a> pour continuer.',
|
||||
CAS_STR_AUTHENTICATION_FAILED
|
||||
|
||||
|
||||
=> 'Authentification CAS infructueuse !',
|
||||
|
||||
|
||||
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
|
||||
|
||||
|
||||
=> '<p>Vous n\'avez pas été authentifié(e).</p><p>Vous pouvez soumettre votre requete à nouveau en cliquant <a href="%s">ici</a>.</p><p>Si le problème persiste, vous pouvez contacter <a href="mailto:%s">l\'administrateur de ce site</a>.</p>',
|
||||
|
||||
|
||||
=> '<p>Vous n\'avez pas <20>t<EFBFBD> authentifi<66>(e).</p><p>Vous pouvez soumettre votre requete <20> nouveau en cliquant <a href="%s">ici</a>.</p><p>Si le probl<62>me persiste, vous pouvez contacter <a href="mailto:%s">l\'administrateur de ce site</a>.</p>',
|
||||
CAS_STR_SERVICE_UNAVAILABLE
|
||||
|
||||
|
||||
=> 'Le service `<b>%s</b>\' est indisponible (<b>%s</b>)'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
@ -1,79 +1,27 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
|
||||
* @file languages/german.php
|
||||
|
||||
|
||||
* @author Henrik Genssen <hg at mediafactory.de>
|
||||
|
||||
|
||||
* @sa @link internalLang Internationalization @endlink
|
||||
|
||||
|
||||
* @ingroup internalLang
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$this->_strings = array(
|
||||
|
||||
|
||||
CAS_STR_USING_SERVER
|
||||
|
||||
|
||||
=> 'via Server',
|
||||
|
||||
|
||||
CAS_STR_AUTHENTICATION_WANTED
|
||||
|
||||
|
||||
=> 'CAS Authentifizierung erforderlich!',
|
||||
|
||||
|
||||
CAS_STR_LOGOUT
|
||||
|
||||
|
||||
=> 'CAS Abmeldung!',
|
||||
|
||||
|
||||
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
|
||||
|
||||
|
||||
=> 'eigentlich häten Sie zum CAS Server weitergeleitet werden sollen. Drücken Sie <a href="%s">hier</a> um fortzufahren.',
|
||||
|
||||
|
||||
CAS_STR_AUTHENTICATION_FAILED
|
||||
|
||||
|
||||
=> 'CAS Anmeldung fehlgeschlagen!',
|
||||
|
||||
|
||||
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
|
||||
|
||||
|
||||
=> '<p>Sie wurden nicht angemeldet.</p><p>Um es erneut zu versuchen klicken Sie <a href="%s">hier</a>.</p><p>Wenn das Problem bestehen bleibt, kontkatieren Sie den <a href="mailto:%s">Administrator</a> dieser Seite.</p>',
|
||||
|
||||
|
||||
CAS_STR_SERVICE_UNAVAILABLE
|
||||
|
||||
|
||||
=> 'Der Dienst `<b>%s</b>\' ist nicht verfügbar (<b>%s</b>).'
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
27
auth/cas/CAS/CAS/languages/greek.php
Normal file
27
auth/cas/CAS/CAS/languages/greek.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file languages/greek.php
|
||||
* @author Vangelis Haniotakis <haniotak at ucnet.uoc.gr>
|
||||
* @sa @link internalLang Internationalization @endlink
|
||||
* @ingroup internalLang
|
||||
*/
|
||||
|
||||
$this->_strings = array(
|
||||
CAS_STR_USING_SERVER
|
||||
=> '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
CAS_STR_AUTHENTICATION_WANTED
|
||||
=> '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> CAS!',
|
||||
CAS_STR_LOGOUT
|
||||
=> '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> CAS!',
|
||||
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
|
||||
=> '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> CAS. <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <a href="%s"><3E><><EFBFBD></a> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.',
|
||||
CAS_STR_AUTHENTICATION_FAILED
|
||||
=> '<27> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> CAS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!',
|
||||
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
|
||||
=> '<p><3E><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.</p><p><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <a href="%s"><3E><><EFBFBD></a>.</p><p><3E><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <a href="mailto:%s"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></a>.</p>',
|
||||
CAS_STR_SERVICE_UNAVAILABLE
|
||||
=> '<27> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> `<b>%s</b>\' <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<b>%s</b>).'
|
||||
);
|
||||
|
||||
?>
|
27
auth/cas/CAS/CAS/languages/japanese.php
Normal file
27
auth/cas/CAS/CAS/languages/japanese.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file languages/japanese.php
|
||||
* @author fnorif (fnorif@yahoo.co.jp)
|
||||
*
|
||||
* Now Encoding is EUC-JP and LF
|
||||
**/
|
||||
|
||||
$this->_strings = array(
|
||||
CAS_STR_USING_SERVER
|
||||
=> 'using server',
|
||||
CAS_STR_AUTHENTICATION_WANTED
|
||||
=> 'CAS<41>ˤ<EFBFBD><CBA4>ǧ<EFBFBD>ڤ<EFBFBD>Ԥ<EFBFBD><D4A4>ޤ<EFBFBD>',
|
||||
CAS_STR_LOGOUT
|
||||
=> 'CAS<41><53><EFBFBD><EFBFBD>?<3F><><EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD><C8A4>ޤ<EFBFBD>!',
|
||||
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
|
||||
=> 'CAS<41><53><EFBFBD><EFBFBD><EFBFBD>Ф˹Ԥ<CBB9>ɬ<EFBFBD>פ<EFBFBD><D7A4><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD><EFBFBD><EFBFBD>ưŪ<C6B0><C5AA>ž<EFBFBD><C5BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʤ<EFBFBD><CAA4><EFBFBD><EFBFBD><EFBFBD> <a href="%s"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></a> <20><EFBFBD>å<EFBFBD><C3A5><EFBFBD><EFBFBD><EFBFBD>³<EFBFBD>Ԥ<EFBFBD><D4A4>ޤ<EFBFBD><DEA4><EFBFBD>',
|
||||
CAS_STR_AUTHENTICATION_FAILED
|
||||
=> 'CAS<41>ˤ<EFBFBD><CBA4>ǧ<EFBFBD>ڤ˼<DAA4><CBBC>Ԥ<EFBFBD><D4A4>ޤ<EFBFBD><DEA4><EFBFBD>',
|
||||
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
|
||||
=> '<p>ǧ<>ڤǤ<DAA4><C7A4>ޤ<EFBFBD><DEA4><EFBFBD>Ǥ<EFBFBD><C7A4><EFBFBD>.</p><p><3E>⤦<EFBFBD><E2A4A6><EFBFBD>٥ꥯ<D9A5><EAA5AF><EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD><C8A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><a href="%s"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></a><3E><EFBFBD>å<EFBFBD>.</p><p><3E><><EFBFBD>꤬<EFBFBD><EAA4AC>褷<EFBFBD>ʤ<EFBFBD><CAA4><EFBFBD><EFBFBD><EFBFBD> <a href="mailto:%s"><3E><><EFBFBD>Υ<EFBFBD><CEA5><EFBFBD><EFBFBD>Ȥδ<C8A4><CEB4><EFBFBD><EFBFBD></a><3E><><EFBFBD>䤤<EFBFBD><E4A4A4>碌<EFBFBD>Ƥ<EFBFBD><C6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.</p>',
|
||||
CAS_STR_SERVICE_UNAVAILABLE
|
||||
=> '<27><><EFBFBD><EFBFBD><EFBFBD>ӥ<EFBFBD> `<b>%s</b>\' <20><><EFBFBD><EFBFBD><EFBFBD>ѤǤ<D1A4><C7A4>ޤ<EFBFBD><DEA4><EFBFBD> (<b>%s</b>).'
|
||||
);
|
||||
|
||||
?>
|
@ -1,70 +1,24 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
|
||||
* @file languages/languages.php
|
||||
|
||||
|
||||
* Internationalization constants
|
||||
|
||||
|
||||
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
|
||||
|
||||
|
||||
* @sa @link internalLang Internationalization @endlink
|
||||
|
||||
|
||||
* @ingroup internalLang
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//@{
|
||||
|
||||
|
||||
/**
|
||||
|
||||
|
||||
* a phpCAS string index
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
define("CAS_STR_USING_SERVER", 1);
|
||||
|
||||
|
||||
define("CAS_STR_AUTHENTICATION_WANTED", 2);
|
||||
|
||||
|
||||
define("CAS_STR_LOGOUT", 3);
|
||||
|
||||
|
||||
define("CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED", 4);
|
||||
|
||||
|
||||
define("CAS_STR_AUTHENTICATION_FAILED", 5);
|
||||
|
||||
|
||||
define("CAS_STR_YOU_WERE_NOT_AUTHENTICATED", 6);
|
||||
|
||||
|
||||
define("CAS_STR_SERVICE_UNAVAILABLE", 7);
|
||||
|
||||
|
||||
//@}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
27
auth/cas/CAS/CAS/languages/spanish.php
Normal file
27
auth/cas/CAS/CAS/languages/spanish.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file languages/spanish.php
|
||||
* @author Iván-Benjamín García Torà <ivaniclixx AT gmail DOT com>
|
||||
* @sa @link internalLang Internationalization @endlink
|
||||
* @ingroup internalLang
|
||||
*/
|
||||
|
||||
$this->_strings = array(
|
||||
CAS_STR_USING_SERVER
|
||||
=> 'usando servidor',
|
||||
CAS_STR_AUTHENTICATION_WANTED
|
||||
=> '¡Autentificación CAS necesaria!',
|
||||
CAS_STR_LOGOUT
|
||||
=> '¡Salida CAS necesaria!',
|
||||
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
|
||||
=> 'Ya debería haber sido redireccionado al servidor CAS. Haga click <a href="%s">aquí</a> para continuar.',
|
||||
CAS_STR_AUTHENTICATION_FAILED
|
||||
=> '¡Autentificación CAS fallida!',
|
||||
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
|
||||
=> '<p>No estás autentificado.</p><p>Puedes volver a intentarlo haciendo click <a href="%s">aquí</a>.</p><p>Si el problema persiste debería contactar con el <a href="mailto:%s">administrador de este sitio</a>.</p>',
|
||||
CAS_STR_SERVICE_UNAVAILABLE
|
||||
=> 'El servicio `<b>%s</b>\' no está disponible (<b>%s</b>).'
|
||||
);
|
||||
|
||||
?>
|
File diff suppressed because it is too large
Load Diff
@ -1,79 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
|
||||
* @file languages/greek.php
|
||||
|
||||
|
||||
* @author Vangelis Haniotakis <haniotak at ucnet.uoc.gr>
|
||||
|
||||
|
||||
* @sa @link internalLang Internationalization @endlink
|
||||
|
||||
|
||||
* @ingroup internalLang
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$this->_strings = array(
|
||||
|
||||
|
||||
CAS_STR_USING_SERVER
|
||||
|
||||
|
||||
=> '÷ñçóéìïðïéåßôáé ï åîõðçñåôçôÞò',
|
||||
|
||||
|
||||
CAS_STR_AUTHENTICATION_WANTED
|
||||
|
||||
|
||||
=> 'Áðáéôåßôáé ç ôáõôïðïßçóç CAS!',
|
||||
|
||||
|
||||
CAS_STR_LOGOUT
|
||||
|
||||
|
||||
=> 'Áðáéôåßôáé ç áðïóýíäåóç áðü CAS!',
|
||||
|
||||
|
||||
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
|
||||
|
||||
|
||||
=> 'Èá Ýðñåðå íá åß÷áôå áíáêáôåõèõíèåß óôïí åîõðçñåôçôÞ CAS. ÊÜíôå êëßê <a href="%s">åäþ</a> ãéá íá óõíå÷ßóåôå.',
|
||||
|
||||
|
||||
CAS_STR_AUTHENTICATION_FAILED
|
||||
|
||||
|
||||
=> 'Ç ôáõôïðïßçóç CAS áðÝôõ÷å!',
|
||||
|
||||
|
||||
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
|
||||
|
||||
|
||||
=> '<p>Äåí ôáõôïðïéçèÞêáôå.</p><p>Ìðïñåßôå íá îáíáðñïóðáèÞóåôå, êÜíïíôáò êëßê <a href="%s">åäþ</a>.</p><p>Åáí ôï ðñüâëçìá åðéìåßíåé, åëÜôå óå åðáöÞ ìå ôïí <a href="mailto:%s">äéá÷åéñéóôÞ</a>.</p>',
|
||||
|
||||
|
||||
CAS_STR_SERVICE_UNAVAILABLE
|
||||
|
||||
|
||||
=> 'Ç õðçñåóßá `<b>%s</b>\' äåí åßíáé äéáèÝóéìç (<b>%s</b>).'
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
@ -1,53 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* @file languages/japanese.php
|
||||
|
||||
* @author fnorif (fnorif@yahoo.co.jp)
|
||||
|
||||
*
|
||||
|
||||
* Now Encoding is EUC-JP and LF
|
||||
|
||||
**/
|
||||
|
||||
|
||||
|
||||
$this->_strings = array(
|
||||
|
||||
CAS_STR_USING_SERVER
|
||||
|
||||
=> 'using server',
|
||||
|
||||
CAS_STR_AUTHENTICATION_WANTED
|
||||
|
||||
=> 'CASによる認証を行います',
|
||||
|
||||
CAS_STR_LOGOUT
|
||||
|
||||
=> 'CASからログアウトします!',
|
||||
|
||||
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
|
||||
|
||||
=> 'CASサーバに行く必要があります。自動的に転送されない場合は <a href="%s">こちら</a> をクリックして続行します。',
|
||||
|
||||
CAS_STR_AUTHENTICATION_FAILED
|
||||
|
||||
=> 'CASによる認証に失敗しました',
|
||||
|
||||
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
|
||||
|
||||
=> '<p>認証できませんでした.</p><p>もう一度リクエストを送信する場合は<a href="%s">こちら</a>をクリック.</p><p>問題が解決しない場合は <a href="mailto:%s">このサイトの管理者</a>に問い合わせてください.</p>',
|
||||
|
||||
CAS_STR_SERVICE_UNAVAILABLE
|
||||
|
||||
=> 'サービス `<b>%s</b>\' は利用できません (<b>%s</b>).'
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
@ -1,7 +0,0 @@
|
||||
PHP CAS library import
|
||||
|
||||
List of changes:
|
||||
1/ backported fix for: http://www.ja-sig.org/issues/browse/PHPCAS-52 (MDL-21802)
|
||||
|
||||
|
||||
skodak
|
@ -98,8 +98,10 @@ class auth_plugin_cas extends auth_plugin_base {
|
||||
$username = optional_param("username", '', PARAM_RAW);
|
||||
|
||||
if (!empty($username)) {
|
||||
if (strstr($SESSION->wantsurl,'ticket') || strstr($SESSION->wantsurl,'NOCAS'))
|
||||
if (isset($SESSION->wantsurl) && (strstr($SESSION->wantsurl, 'ticket') ||
|
||||
strstr($SESSION->wantsurl, 'NOCAS'))) {
|
||||
unset($SESSION->wantsurl);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@ -113,6 +115,9 @@ class auth_plugin_cas extends auth_plugin_base {
|
||||
// Connection to CAS server
|
||||
$this->connectCAS();
|
||||
|
||||
// Don't try to validate the server SSL credentials
|
||||
phpCAS::setNoCasServerValidation();
|
||||
|
||||
// Gestion de la connection CAS si acc<63>s direct d'un ent ou autre
|
||||
if (phpCAS::checkAuthentication()) {
|
||||
$frm->username=phpCAS::getUser();
|
||||
@ -122,7 +127,7 @@ class auth_plugin_cas extends auth_plugin_base {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($_GET["loginguest"]== true) {
|
||||
if (isset($_GET["loginguest"]) && ($_GET["loginguest"]== true)) {
|
||||
$frm->username="guest";
|
||||
$frm->password="guest";
|
||||
return;
|
||||
@ -161,7 +166,7 @@ class auth_plugin_cas extends auth_plugin_base {
|
||||
if ($this->config->logoutcas ) {
|
||||
$backurl = $CFG->wwwroot;
|
||||
$this->connectCAS();
|
||||
phpCAS::logout($backurl);
|
||||
phpCAS::logoutWithURL($backurl);
|
||||
}
|
||||
}
|
||||
/**
|
||||
@ -175,12 +180,13 @@ class auth_plugin_cas extends auth_plugin_base {
|
||||
global $PHPCAS_CLIENT;
|
||||
// mode proxy CAS
|
||||
if ( !is_object($PHPCAS_CLIENT) ) {
|
||||
// Make sure phpCAS doesn't try to start a new PHP session when connecting to the CAS server.
|
||||
if ($this->config->proxycas) {
|
||||
phpCAS::proxy($this->config->casversion, $this-> config->hostname, (int) $this->config->port, $this->config->baseuri);
|
||||
phpCAS::proxy($this->config->casversion, $this-> config->hostname, (int) $this->config->port, $this->config->baseuri, false);
|
||||
}
|
||||
// mode client CAS
|
||||
else {
|
||||
phpCAS::client($this->config->casversion, $this-> config->hostname, (int) $this->config->port, $this->config->baseuri);
|
||||
phpCAS::client($this->config->casversion, $this-> config->hostname, (int) $this->config->port, $this->config->baseuri, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user