Salandora / OctoPrint-SystemCommandEditor

This plugin makes System Commands editable through the OctoPrint WebUI
GNU Affero General Public License v3.0
9 stars 10 forks source link

Mandatory "action" parameter is not enforced, entries created without can't be fixed/deleted #8

Closed foosel closed 5 years ago

foosel commented 7 years ago

Hey, just as a heads-up, I just had a user on the mailing list run into an issue where they created a new system command but without specifying the "action" parameter. Since that is mandatory this lead to issues in both OctoPrint itself (command could not be executed since it couldn't be found) as well as the editor plugin (no action parameter means also no way to edit the entry or even just delete it).

I'll look into stripping such invalid entries from OctoPrint outright or generating an action value for them, but it might still be a good idea to have the plugin either pre populate that field (e.g. by stripping anything that isn't [a-z0-9_-] from the name & lower casing it), generate it (hash over name + command?) or at least not allow to click save unless it's filled in.

Salandora commented 7 years ago

I think i stick with the last and make it a recommended field xD, Sorry I had that issue a few times now and it constantly slipped through my mind...

jonas-schievink commented 6 years ago

Just hit this bug. Luckily, it's easy to delete the offending lines from config.yaml. Also, it looks like b072352b86ecdcc4daf12f3e04aff7430f138d58 fixes this.

Salandora commented 6 years ago

Jup that fixes it, but it is still in devel, so not released yet :-)

Salandora commented 5 years ago

Completely forgot to push the fix to master, have done it yet and will release version 0.3.2 in a bit. ... stupid me...