?
Referenced as Pull Request for: # 6035
avatar Erftralle
Erftralle
7 Feb 2015

If using the JInput::getArray() function without parameters e.g.

        $mypostdata = $myapp->input->post->getArray();

and the post data contains variables having values matching a JInputFilter type e.g. 'integer', 'int', 'float' etc. these values will be applied as filter in the following function code:

                if (is_null($datasource))
                {
                    $results[$k] = $this->get($k, null, $v);
                }

When calling the function without parameters the function uses the class property 'data', which is an associative array with variable names and their values.

So, a POST variable 'myinputstring' containing a string value 'integer' will be returned as an integer containing a 0, which is definetly a wrong behaviour.

Wouldn't it be better to detect a parameterless function call to apply 'RAW' filters in that case?

avatar Erftralle Erftralle - open - 7 Feb 2015
avatar joomla-cms-bot joomla-cms-bot - change - 7 Feb 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 7 Feb 2015
Category Libraries
avatar Erftralle Erftralle - change - 7 Feb 2015
The description was changed
avatar Erftralle
Erftralle - comment - 10 Feb 2015

Opened pull request #6035 with a proposal for a fix.

avatar zero-24 zero-24 - change - 12 Feb 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-02-12 21:25:12
Closed_By zero-24
avatar joomla-cms-bot joomla-cms-bot - change - 12 Feb 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-02-12 21:25:19
avatar joomla-cms-bot joomla-cms-bot - close - 12 Feb 2015
avatar joomla-cms-bot
joomla-cms-bot - comment - 12 Feb 2015

Set to "closed" on behalf of @zero-24 by The JTracker Application at issues.joomla.org/joomla-cms/6008

avatar joomla-cms-bot joomla-cms-bot - close - 12 Feb 2015
avatar zero-24
zero-24 - comment - 12 Feb 2015

Closing here as we have a PR by @Erftralle here: #6035 Thanks!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6008.

Add a Comment

Login with GitHub to post a comment