Support

Admin Tools

#13895 Multi dimensional array problem with UploadShield

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by nicholas on Thursday, 25 October 2012 03:34 CDT

designfire
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? Yes
Have I searched the tickets before posting? Yes
Have I read the documentation before posting (which pages?)? Yes
Joomla! version: 2.5.7
PHP version: 5.3.17
MySQL version: 5.0.51a-24+lenny5
Host: (optional, but it helps us help you)
Admin Tools version: 2.4.0

Description of my issue:

Hi Nicholas,

I have a problem with the UploadShield-scanner. I get the following warnings:

Warning: strstr() expects parameter 1 to be string, array given in XYZ/plugins/system/admintools/admintools/pro.php on line 2650
Warning: explode() expects parameter 2 to be string, array given in XYZ/plugins/system/admintools/admintools/pro.php on line 2656

A print_r($files); after line 2640 gives the following information:

Array ( [0] => Array ( [name] => Array ( [yLc4p_car37_car_13_repeat___file] => Array ( [0] => [1] => [2] => [3] => ) ) [type] => Array ( [yLc4p_car37_car_13_repeat___file] => Array ( [0] => [1] => [2] => [3] => ) ) [tmp_name] => Array ( [yLc4p_car37_car_13_repeat___file] => Array ( [0] => [1] => [2] => [3] => ) ) [error] => Array ( [yLc4p_car37_car_13_repeat___file] => Array ( [0] => 4 [1] => 4 [2] => 4 [3] => 4 ) ) [size] => Array ( [yLc4p_car37_car_13_repeat___file] => Array ( [0] => 0 [1] => 0 [2] => 0 [3] => 0 ) ) ) )

The form elements names are like:
join[60][yLc4p_car37_car_13_repeat___title][1]
join[60][yLc4p_car37_car_13_repeat___title][2]

It seems that the Scanner can't handle this multi dimensional arrays. Is there a way to fix this?

Best regards,

Jonathan Werner
www.designfire.de

nicholas
Akeeba Staff
Manager
I am not sure what happens. Either your component is updated but your plugin is not or this is a bug I have already fixed (albeit I see that it was several releases ago). Line 2650 in the current code reads:
$extraInfo .= "File descriptor :\n";

There is nothing to throw a warning over there. Please try installing the latest dev release.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

designfire
After having upgraded to the latest dev version I get the following errors:

Warning: strstr() expects parameter 1 to be string, array given in /usr/www/users/cariie/plugins/system/admintools/admintools/pro.php on line 2655

Warning: explode() expects parameter 2 to be string, array given in /usr/www/users/cariie/plugins/system/admintools/admintools/pro.php on line 2661

Warning: array_reverse() expects parameter 1 to be array, null given in /usr/www/users/cariie/plugins/system/admintools/admintools/pro.php on line 2662

nicholas
Akeeba Staff
Manager
I uploaded a new dev release which should address this issue. Can you please test it and report back your results? Thank you in advance!

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

designfire
I have installed version revF6A8833 now. Samre errors, different lines:

Warning: strstr() expects parameter 1 to be string, array given in /usr/www/users/cariie/plugins/system/admintools/admintools/pro.php on line 2670

Warning: explode() expects parameter 2 to be string, array given in /usr/www/users/cariie/plugins/system/admintools/admintools/pro.php on line 2676

Warning: array_reverse() expects parameter 1 to be array, null given in /usr/www/users/cariie/plugins/system/admintools/admintools/pro.php on line 2677

nicholas
Akeeba Staff
Manager
You'll just have to turn off UploadShield on your site. You seem to have too many nested levels of variables in those uploads. There's no way to handle them automatically.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

designfire
Hi Nicholas! Ok, I see that it might be to much to support that much nested variables. It's Fabrik (www.fabrikar.com) that produces this stuff... For the moment I will turn off UploadShield. Thanks for your time!

nicholas
Akeeba Staff
Manager
You're welcome!

The problem with too many nested levels is that the code becomes very complex. Since it runs on each upload it ends up being too slugish. The goal is to have a good degree of protection without adding an overhead of more than 15% - 20% in the worst case scenario. Unfortunately this means that there is a minority of cases where the protection doesn't work - exactly what happens in your case :(

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!