emre / storm

Manage your SSH like a boss.
http://stormssh.readthedocs.org/en/master/
MIT License
3.93k stars 172 forks source link

Check deleted_field in options before del it #135

Closed reorx closed 10 months ago

reorx commented 7 years ago

This commit is aimed at fixing PUT /edit 400 problem when edit an item in web interface. When editing in web, if id_file is left empty, it will cause ConfigParser.update_host to try deleting identityfile in options, but if identityfile is not in options for whatever reason, update_host will raise KeyError exception hence /edit will fail with 400. By checking each key in options before del, KeyError could be avoided.