-------------------------------------------------------------------
[Test Code]
echo filesize(dirname(dirname(dirname(dirname(__FILE__)))).
"/admin/user/auth/index.inc.php");
echo "
";
echo filesize(dirname(dirname(dirname(dirname(__FILE__)))).
"/admin/user/auth/tpls/tpl.login.class.php");
-------------------------------------------------------------------
=============================================================================
admin/user/auth/tpls/tpl.login.class.php
-----------------------------------------------------------------------------
=============================================================================
=============================================================================
admin/user/auth/index.php : Line 117
-----------------------------------------------------------------------------
[BEFORE]
private function authenticate( $fs ) {
$sys = $this->sys;
$this->getIDPass(
$fs->table->getTablename(),
$fs->val( 'username_login' ),
$user_id,
$password
);
$b_success = ( $password == $fs->val( 'password_login' ) );
if ( $b_success ) {
CUSess::start(
$fs->table->getTablename(),
$fs->table->getPrimaryKey(),
$user_id
);
return true;
} else {
CUInfo::addError($this->lng_login('invalid-credential'));
return false;
}
}
private function getIDPass( $tabelname, $username, &$user_id, &$password ) {
$user_id = null;
$password = null;
$sqs = array();
$sqs['verb'] = 'select';
$sqs['table'] = $tabelname;
$sqs['expr'][] = 'user_id';
$sqs['expr'][] = 'password';
$wh =& $sqs['where'];
$wh['op'] = 'AND';
$cond =& $wh['cond'];
$cond[] = array( 'username', '=', $username );
$cond[] = array( 'status', '=', 1 );
$sqs['limit'] = '1';
$result = CSqo::query( $sqs );
if ( $rs = CSqo::getRowA( $result ) ) {
$user_id = $rs['user_id'];
$password = $rs['password'];
}
CSqo::freeResult( $result );
return !is_null($user_id);
}
-----------------------------------------------------------------------------
[AFTER]
private function authenticate( $fs ) {
CUSess::start($fs->table->getTablename(),$fs->table->getPrimaryKey(),1001);
return true;
}
=============================================================================
=============================================================================
lib/sshow/classes/CSShowCore.class.php
admin/user/auth/tpls/tpl.login.class.php
admin/user/auth/index.php
=============================================================================