User tests: Successful: Unsuccessful:
Pull Request for Issue #32106 .
The changes prevent forcing of application/x-www-form-urlencoded
for non String data, without b.c.
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
First request will contain random text in Form data, like:
Both request should contain foo:bar Form data, like:
no
Status | New | ⇒ | Pending |
Category | ⇒ | JavaScript |
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.
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Labels |
Added:
?
?
|
please commit its RTC now
?
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 ?
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 |
Thanks
@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:
For the second request I get form data before and after the patch: