Closed texnixe closed 2 years ago
We discussed this a while back, can't find it anymore. :(
Basically we could create a blocklist of methods of each class that cannot be called from the query language. Would be a bit hard to maintain though.
I think we need to bring KQL into the core sooner or later. It solves all of that already. It would also allow to use queries in client side panel code which would be super powerful
I would suggest to close this for now as we cannot solve it until e.g. adding KQL to the core.
Describe the bug
If you are really unlucky and happen to call a field
delete
and then use this field name in your query syntax, this can result in all your content being lost.Example:
When you open this section in the Panel, the pages in the section are deleted.
Expected behavior
While field names shouldn't use native methods, it can happen. Maybe it would make sense to disable such destructive methods in query syntax or only allow GET requests.
Screenshots
Kirby Version
Tested with 3.5.7.1 and Kirby 3.6
Additional context