Use lowercase when matching extensions
(cherry picked from commit 29cee16)
This commit is contained in:
parent
f07b2477f5
commit
537c205757
2 changed files with 2 additions and 2 deletions
|
|
@ -121,7 +121,7 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin,
|
|||
upload_path = flask.request.values[input_upload_path]
|
||||
upload_name = flask.request.values[input_upload_name]
|
||||
|
||||
exts = filter(lambda x: upload_name.endswith(x), (".zip", ".tar.gz", ".tgz", ".tar"))
|
||||
exts = filter(lambda x: upload_name.lower().endswith(x), (".zip", ".tar.gz", ".tgz", ".tar"))
|
||||
if not len(exts):
|
||||
return flask.make_response("File doesn't have a valid extension for a plugin archive", 400)
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ def uploadLanguagePack():
|
|||
upload_name = request.values[input_upload_name]
|
||||
upload_path = request.values[input_upload_path]
|
||||
|
||||
exts = filter(lambda x: upload_name.endswith(x), (".zip", ".tar.gz", ".tgz", ".tar"))
|
||||
exts = filter(lambda x: upload_name.lower().endswith(x), (".zip", ".tar.gz", ".tgz", ".tar"))
|
||||
if not len(exts):
|
||||
return make_response("File doesn't have a valid extension for a plugin archive", 400)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue