• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed XenForo_Model_User::updateSessionActivity wrong "substr" function use

Affected version
1.x
#1
PHP:
public function updateSessionActivity($userId, $ip, $controllerName, $action, $viewState, array $inputParams, $viewDate = null, $robotKey = '')
{
    ...
    $controllerName = substr($controllerName, 0, 50); // why 50? In database table "xf_session_activity"column "controller_name" has type varbinary(75)
    $action = substr($action, 0, 50);
    ...
    try
    {
            $this->_getDb()->query('
                INSERT INTO xf_session_activity
                    (user_id, unique_key, ip, controller_name, controller_action, view_state, params, view_date, robot_key)
                VALUES
                    (?, ?, ?, ?, ?, ?, ?, ?, ?)
    ...

}