CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#11427] PHP Notices when mact called with insufficient parameters

avatar
Created By: (JamesT)
Date Submitted: Fri Jun 23 08:50:49 -0400 2017

Assigned To:
Version: 2.2.1
CMSMS Version: 2.2.1
Severity: Minor
Resolution: Fixed
State: Open
Summary:
PHP Notices when mact called with insufficient parameters
Detailed Description:
PHP Notices are logged when mact is called without parameters, or with
insufficient parameters.

URL: https://www.m.co.uk/index.php?mact

Errors:
[23-Jun-2017 13:32:33 Europe/London] PHP Notice:  Undefined offset: 1 in
/var/sites/m/m.co.uk/public_html/lib/page.functions.php on line 523
[23-Jun-2017 13:32:33 Europe/London] PHP Notice:  Undefined offset: 2 in
/var/sites/m/m.co.uk/public_html/lib/page.functions.php on line 523
[23-Jun-2017 13:32:33 Europe/London] PHP Notice:  Undefined offset: 3 in
/var/sites/m/m.co.uk/public_html/lib/page.functions.php on line 523

Line 523 of page.functions.php explodes the mact request variable and sends to
list without checking if the variable has enough parameters:

list($module,$id,$action,$inline) = explode(',',$_REQUEST['mact'],4);

Perhaps can be solved by prepending with:

if( count(explode(',',$_REQUEST['mact'],4)) != 4 ) return;


History

Comments
avatar
Date: 2021-10-25 09:46
Posted By: Fernando Morgado (JoMorg)

fixed in svn for 2.2.16
      
Updates

Updated: 2021-10-25 09:46
resolution_id: => 7