Alter Ego Detector

Alter Ego Detector 1.7.8

No permission to download
Note that this isn't a blocking error -- it's a mostly informational error. It actually just leaves the serialized content in the column if it fails (which will implicitly decode to an empty array as is, since the JSON encode will fail). So you could theoretically manipulate it in 2.1 as the code is at this instant.

However, the approach taken here was conservative in the sense that we didn't want to wipe out content in the DB during the upgrade and wanted to see if we had any error reports from people doing upgrades; this is the first one that I recall seeing (and it's actually the table I was expecting as I vaguely remember some related issues in the past). There is potentially an option to use the JSON_PARTIAL_OUTPUT_ON_ERROR flag on these conversions. This will strip out anything that it can't JSON encode, while keeping most data, but that does mean removing content from the table and it won't be recoverable. We may be adjusting the code to that -- I've kept that bug open mostly for that reason.
 
Hello. Recently I created a staging environment to test the upgrade process and resolve issues that pop up so we can get it all pinned down once we do the live upgrade.

Our forum is on Xenforo Version 1.4.12 using Alter Ego 1.5.6

I upgraded our staging site to Xenforo Version 1.5.23 and upgraded Alter Ego to 1.7.6.

In our staging site I am unable to get the add-on to trigger alter ego detections. In the server error log I get this:

ErrorException: A non-numeric value encountered - library/LiamW/AlterEgoDetector/XenForo/Model/SpamPrevention.php:387

It's faulting somewhere around here from SpamPrevention.php I believe:

Code:
SELECT user.*, a.ip, a.log_date, permission_combination.cache_value AS global_permission_cache
            FROM (
                SELECT user_id, ip, max(log_date) AS log_date
                FROM xf_ip AS ip
                WHERE ip.ip = ? AND log_date >= ?
                GROUP BY ip.user_id
            ) a
            INNER JOIN xf_user AS user ON (user.user_id = a.user_id)
            LEFT JOIN xf_permission_combination AS permission_combination ON (permission_combination.permission_combination_id = user.permission_combination_id)
            ORDER BY user.user_id
        ', 'user_id', [$ip, XenForo_Application::$time - $timeLimit * 60]
        );
Line 387 is this one:
Code:
   ', 'user_id', [$ip, XenForo_Application::$time - $timeLimit * 60]

Does anyone know any reason why it wouldn't be calculating a numerical value? Here is the stack trace with our personal site information redacted:
Code:
#0 /LiamW/AlterEgoDetector/XenForo/Model/SpamPrevention.php(387): XenForo_Application::handlePhpError(2, 'A non-numeric v...', '/srv/www/forums...', 387, Array)

#1 /LiamW/AlterEgoDetector/XenForo/Model/SpamPrevention.php(471): LiamW_AlterEgoDetector_XenForo_Model_SpamPrevention->_getUsersByIp('\x7F\x00\x00\x01', '')

#2 /LiamW/AlterEgoDetector/XenForo/ControllerPublic/Login.php(39): LiamW_AlterEgoDetector_XenForo_Model_SpamPrevention->detectAlterEgo(Array, '129505')

#3 /library/XenForo/FrontController.php(369): LiamW_AlterEgoDetector_XenForo_ControllerPublic_Login->actionLogin()

#4 /library/XenForo/FrontController.php(152): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))

#5 /[REDACTED SITENAME]/public/index.php(13): XenForo_FrontController->run()

#6 {main}
Code:
array(3) {
  ["url"] => string(65) "[REDACTED SITENAME]/login"
  ["_GET"] => array(1) {
    ["login/login"] => string(0) ""
  }
  ["_POST"] => array(7) {
    ["login"] => string(9) "[REDACTED USER]"
    ["register"] => string(1) "0"
    ["password"] => string(8) "********"
    ["remember"] => string(1) "1"
    ["cookie_check"] => string(1) "1"
    ["redirect"] => string(37) "/[REDACTED SITENAME]/public/index.php"
    ["_xfToken"] => string(8) "********"
  }
}
 
we need exactly the same addon for XF 2
 
Top Bottom