Use lowercase when matching extensions
This commit is contained in:
1 parent
18816b6ea8
commit
29cee16d3e
2 files changed
+2
-2
No files matched your search
@@ -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)
|
||||
|
||||
|
||||
Reference in new issue
Block a user