Avoid GET requests for delete operations

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
createanet
Posts: 72
Joined: 22 Mar 2021, 16:56

Avoid GET requests for delete operations

Post by createanet » 09 Feb 2022, 10:43

Hello,

Currently using 2020.10.*, I notice a change was introduced July/2021.

https://github.com/aimeos/aimeos-larave ... fa3ff69270

This is now preventing me from removing items from the import/export panel.

Reading the comments on the commit it references changes on `ai-admin-jqadm`. I already have `ai-admin-jqadm:2020.10.x-dev` in my project and this fails to make any difference. The reference here also seems unrelated to the dashboard, but rather the order list and the confirm-delete vue component.

Looking into themes/dashboard.js this fails to contain any hooks on elements in order to intercept the event and make a POST request.

I tried testing this on the 2021 demo, but I don't think you have a schedule job running to process exports so they never appeared on the demo dashboard for me to execute.

Any clues please?

Thanks,

User avatar
aimeos
Administrator
Posts: 7908
Joined: 01 Jan 1970, 00:00

Re: Avoid GET requests for delete operations

Post by aimeos » 10 Feb 2022, 15:20

You are right, deleting export jobs in the dashboard was not possible any more due to adding strict security measures to prevent XSS attacks. The is now fixed and you can test the latest version using:

Code: Select all

composer req aimeos/ai-admin-jqadm:2021.10.x-dev
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

createanet
Posts: 72
Joined: 22 Mar 2021, 16:56

Re: Avoid GET requests for delete operations

Post by createanet » 10 Feb 2022, 15:44

Thanks guys,

This package had a dependency on aimeos/aimeos-core 2021.10.*. However as I mention we are stuck on 2020.10.*. We don't have the option/budget to upgrade at the moment.

Not sure what to suggest other than patch it and roll it back, but I can also understand why this was changed.

Do you have any other suggestions please?

User avatar
aimeos
Administrator
Posts: 7908
Joined: 01 Jan 1970, 00:00

Re: Avoid GET requests for delete operations

Post by aimeos » 10 Feb 2022, 15:56

The change are only these few lines:
https://github.com/aimeos/ai-admin-jqad ... hp#L47-L53

You can copy the template to your own extension and replace the appropriate lines with the new ones.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply