QGIS-Contribution / QGIS-ResourceSharing

QGIS Resource Sharing Plugin
http://qgis-contribution.github.io/QGIS-ResourceSharing/
GNU Affero General Public License v3.0
38 stars 18 forks source link

Python expressions support #267

Open JanCaha opened 1 year ago

JanCaha commented 1 year ago

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.

Guts commented 1 year ago

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!

JanCaha commented 1 year ago

No problem with adding docstrings and tests ;)

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