-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[processing][gdal] Do not escape formula because it's not a path! #6960
[processing][gdal] Do not escape formula because it's not a path! #6960
Conversation
Please @alexbruy can you give a look? |
Is this an issue on master too? |
@nyalldawson should be, but gdalcalc is still not available as geoprocess in processing and I hadn't time to integrate it. |
@luipir ah, that's a shame -- i wasn't aware there was unported algorithms here |
confirmed the error should be the same on qgis3...the code is not changed. |
@nyalldawson np I'm not really a processing man, I just realized that it was not available because a collegue here in CartoLab wasn't able to calc a SARVI index with any qgis version. They always have to test on any win version before to notify me any error. |
@luipir But that's for master, not 2.18. |
wonderfull.. I'll add test and pr to 3.x tomorrow. I just checked if there where tests on 2.18. |
Thanks. |
@alexbruy because crash qgis with with memory allocation problem with big images with any version and platform (SAGA has the same problem). I didn't check personally but I saw some tests. I can check personally to add more information about these crashes. |
@nyalldawson I'll check if it would be possible to pass and evaluate dangerous formulas like A*2"; rm * without appropriate escaping. GDAL injection? |
Description
numpy formula in gdal_calc processing algoritm is managed as a path and escaped in case having spaces. This escape generate triky error during gdal execution.
Just test the error setting the default formula from "A*2" to "A * 2".
fix promoted inside GeoMove [1] project for Cartolab [2] (A Coruña university)
[1] http://cartolab.udc.es/geomove/
[2] http://cartolab.udc.es
Checklist
fixes #11111
in the commit message next to the description[FEATURE]
in the commit message[needs-docs]
in the commit message and contain sufficient information in the commit message to be documentedscripts/prepare-commit.sh
script before each commit