? ? Pending

User tests: Successful: Unsuccessful:

avatar Fedik
Fedik
23 Jan 2021

Pull Request for Issue #32106 .

Summary of Changes

The changes prevent forcing of application/x-www-form-urlencoded for non String data, without b.c.

Testing Instructions

Add to index.php of Protostar template:

<script>
var data = new FormData();
data.append('foo', 'bar');

Joomla.request({
  url: 'index.php?option=com_ajax&format=raw',
  data: data
});

Joomla.request({
  url: 'index.php?option=com_ajax&format=raw',
  data: 'foo=bar'
});
</script>

And inspect Developer tools, Network tab for 2 index.php?option=com_ajax&format=raw requests

Actual result BEFORE applying this Pull Request

First request will contain random text in Form data, like:
Screenshot_2021-01-23_12-26-27

Expected result AFTER applying this Pull Request

Both request should contain foo:bar Form data, like:
Screenshot_2021-01-23_12-25-39

Documentation Changes Required

no

avatar Fedik Fedik - open - 23 Jan 2021
avatar Fedik Fedik - change - 23 Jan 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Jan 2021
Category JavaScript
avatar richard67
richard67 - comment - 24 Jan 2021

@Fedik With the patch, I don't get the random parts in the query parameters anymore for the first request, but I still don't get form data:

2021-01-24_01

For the second request I get form data before and after the patch:

2021-01-24_02

avatar Fedik
Fedik - comment - 24 Jan 2021

yea, Firefox network tool a bit different,

To be sure, you can add print_r($_POST); somewhere in com_ajax/ajax.php
and then in Network tab, in Response section you should see Array ( [foo] => bar ) for both request.

avatar richard67 richard67 - test_item - 24 Jan 2021 - Tested successfully
avatar richard67
richard67 - comment - 24 Jan 2021

I have tested this item successfully on e88c42e


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

avatar gostn gostn - test_item - 25 Jan 2021 - Tested successfully
avatar gostn
gostn - comment - 25 Jan 2021

I have tested this item successfully on e88c42e


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

avatar richard67 richard67 - change - 25 Jan 2021
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 25 Jan 2021

RTC


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

avatar richard67 richard67 - change - 25 Jan 2021
Labels Added: ? ?
avatar chnnst
chnnst - comment - 8 Feb 2021

please commit its RTC now

avatar rdeutz
rdeutz - comment - 8 Feb 2021

@chnnst a self like of own comments is looking a bit strange and stupid

avatar chnnst
chnnst - comment - 8 Feb 2021

?

avatar richard67
richard67 - comment - 8 Feb 2021

2021-02-08_03

avatar chnnst
chnnst - comment - 8 Feb 2021

richard67 my question to rdeutz was please commit its RTC now?

All checks have passed.

This branch has no conflicts with the base branch.

Why those with write access to this repository do not merge pull request ?

avatar HLeithner HLeithner - close - 23 Feb 2021
avatar HLeithner HLeithner - merge - 23 Feb 2021
avatar HLeithner HLeithner - change - 23 Feb 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-02-23 18:06:52
Closed_By HLeithner
Labels
avatar HLeithner
HLeithner - comment - 23 Feb 2021

Thanks

Add a Comment

Login with GitHub to post a comment