qgis / QGIS-Django

Django project for QGIS related activities such as plugin repository
http://qgis.org
GNU General Public License v2.0
86 stars 59 forks source link

Validation should actually say what's wrong #312

Closed lnicola closed 1 month ago

lnicola commented 7 months ago

I'm not involved in QGIS, but I've recently seen two users complaining on mantra-request about not being able to upload their archives because of the __pycache__ check. They were sure they didn't have any cache folders, but still got this error from the site.

Alas, they were both wrong, but the validator already know the path to the forbidden file(s) in the archive. It should include that in the error message instead of showing such an unhelpful error.

This can be implemented by including zname in the error message at https://github.com/qgis/QGIS-Django/blob/08f01b4f62a2a75f05947ebf7f39d46c60ff249b/qgis-app/plugins/validator.py#L187-L198, but it will require updating the tests.

Xpirix commented 2 months ago

Please find the proposed fix for this at #387