Skip to content

Commit

Permalink
MDL-11448 FirstClass Authentication does not hold settings and has co…
Browse files Browse the repository at this point in the history
…smetic and info leakage issues, patch by Dan Trockman
  • Loading branch information
skodak committed Oct 7, 2007
1 parent 1bc8aab commit e5245c7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions auth/fc/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function get_userinfo($username) {

$userinfo = array();

$fpp = new fcFPP($this->config->host, $this->config->port);
$fpp = new fcFPP($this->config->host, $this->config->fppport);
if ($fpp->open()) {
if ($fpp->login($this->config->userid, $this->config->passwd)) {
$userinfo['firstname'] = $fpp->getUserInfo($username,"1202");
Expand Down Expand Up @@ -121,7 +121,7 @@ function iscreator($username) {

$fcgroups = array();

$fpp = new fcFPP($this->config->host, $this->config->port);
$fpp = new fcFPP($this->config->host, $this->config->fppport);
if ($fpp->open()) {
if ($fpp->login($this->config->userid, $this->config->passwd)) {
$fcgroups = $fpp->getGroups($username);
Expand Down Expand Up @@ -224,7 +224,7 @@ function process_config($config) {
}

// save settings
set_config('host', $config->user, 'auth/fc');
set_config('host', $config->host, 'auth/fc');
set_config('fppport', $config->fppport, 'auth/fc');
set_config('userid', $config->userid, 'auth/fc');
set_config('passwd', $config->passwd, 'auth/fc');
Expand Down
2 changes: 1 addition & 1 deletion auth/fc/fcFPP.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function open()
$conn = fsockopen($host, $port, $errno, $errstr, 5);
if (!$conn)
{
print_error('auth_fcconnfail','auth', array($errno, $errstr));
print_error('auth_fcconnfail','auth', '', array($errno, $errstr));
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion lang/en_utf8/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
$string['auth_fcpasswd'] = 'Password for the account above.';
$string['auth_fctitle'] = 'FirstClass server';
$string['auth_fcuserid'] = 'Userid for FirstClass account with privilege \'Subadministrator\' set.';
$string['auth_fchost_key'] = 'Host:';
$string['auth_fchost_key'] = 'Host';
$string['auth_fcfppport_key'] = 'Port';
$string['auth_fcuserid_key'] = 'User ID';
$string['auth_fcpasswd_key'] = 'Password';
Expand Down

0 comments on commit e5245c7

Please sign in to comment.