QGIS-ResourceSharing icon indicating copy to clipboard operation
QGIS-ResourceSharing copied to clipboard

Python expressions support

Open JanCaha opened this issue 2 years ago • 2 comments

This PR adds support for handling python expressions, which are so far not supported by the plugin. The expressions should be stored in python_expressions folder under collection, to separate them from other stuff. The expressions are copied into user folder python/expressions.

I see this PR more as a discussion start, about how this should be handled.

There is a potential security issue as the python files with expressions are run (or evaluated) to make the expression available for QGIS. Which can be used to slip malicious code to the user. I am not sure, how this should be handled. Any tips for solutions, would be welcomed. Even thought I still think this is a valuable functionality for users.

JanCaha avatar Jul 31 '22 11:07 JanCaha

Hello @JanCaha,

Thanks for your interest and sorry about the delay, I wanted to finish #259 before everything else and I was on vacations during summer. I recommend you rebase from master to get the latest quality updates.

Expressions support is a nice addition and requested in #203. To approve your submission, I've have to ask you make the necessary changes to comply with the contributing guidelines please? It's all about tests and docstrings.

Thanks!

Guts avatar Sep 05 '22 15:09 Guts

No problem with adding docstrings and tests ;)

But there is the question of security... Should that be somehow adressed?

JanCaha avatar Sep 05 '22 19:09 JanCaha