Search code examples
akeneoplatform.sh

Non RFC compliant ajax request


We are using a akeneo/pim-community-dev installation in version 1.6.23. We are hosting this instance on platform.sh. Since platform has updated their WAF, we now can't update large datasets because the ajax request is invalid. The support of platform told us, that the request being made by akeneo PIM is not RFC compliant. The maximum amount of keys in a form-urlencoded send is 4000 according to the RFC. Since they did not specify a key, every character gets recognized as a key. And thus it fails.

The solution would be sending the data differently. Instead of doing --data '{"code":"vgrp_dur..... we should do --data 'jsondata={"code":"vgrp_dur.....

I actually don't know where I could change the code to do this ... Has someone the knowledge or can give me a hint?


Solution

  • I've found the related part of code and made a composer patch to fix it for the version ^1.6: https://gist.github.com/PaperCoder/63a62d029f7cd879b3ce1b6ac0470e0c

    I added the correct contentType to the $.ajax-JQuery-Call.