Fixed Passing param "_" as an array causes an error

Kent

Active member
Example:
http://xenforo.com/community/index.php?_[]=anything
http://xenforo.com/community/admin.php?_[]=anything

Edit: On a side note, the autolinker doesn't like underscores.
Similar errors occur in many places where an array isn't expected and wouldn't happen under normal use.

ErrorException: ltrim() expects parameter 1 to be string, array given - library/XenForo/Router.php:141
Code:
#0 [internal function]: XenForo_Application::handlePhpError(2, 'ltrim() expects...', '/var/www/xenfor...', 141, Array)
#1 /var/www/xenforo.deb.vm/library/XenForo/Router.php(141): ltrim(Array, '/')
#2 /var/www/xenforo.deb.vm/library/XenForo/Router.php(47): XenForo_Router->getRoutePath(Object(Zend_Controller_Request_Http))
#3 /var/www/xenforo.deb.vm/library/XenForo/Dependencies/Public.php(145): XenForo_Router->match(Object(Zend_Controller_Request_Http))
#4 /var/www/xenforo.deb.vm/library/XenForo/FrontController.php(264): XenForo_Dependencies_Public->route(Object(Zend_Controller_Request_Http))
#5 /var/www/xenforo.deb.vm/library/XenForo/FrontController.php(128): XenForo_FrontController->route()
#6 /var/www/xenforo.deb.vm/index.php(13): XenForo_FrontController->run()
#7 {main}
Code:
array(3) {
  ["url"] => string(44) "http://xenforo.deb.vm/index.php?_[]=anything"
  ["_GET"] => array(1) {
  ["_"] => array(1) {
  [0] => string(8) "anything"
  }
  }
  ["_POST"] => array(0) {
  }
}
 
Last edited:
Fixed for 1.2 and (a potential) 1.1.6.

If you have specific other places, let us know. It should only come up in a few places where we aren't using our input filtering system (which should handle it if it isn't).
 
Seems the fix you applied also fixed the input filter itself as strval would previously error when passing things like _xfResponseType and in cookies xf_session as an array.
 
Back
Top Bottom