mirror of
https://github.com/9001/copyparty.git
synced 2025-10-03 01:39:26 +02:00
wget: only allow http/https/ftp/ftps (#50):
these are all the protocols that are currently supported by wget, so this has no practical effect aside from making sure we won't suddenly get file:// support or something (which would be bad)
This commit is contained in:
parent
8341041857
commit
7df890d964
2 changed files with 8 additions and 0 deletions
|
@ -65,6 +65,10 @@ def main():
|
|||
if "://" not in url:
|
||||
url = "https://" + url
|
||||
|
||||
proto = url.split("://")[0].lower()
|
||||
if proto not in ("http", "https", "ftp", "ftps"):
|
||||
raise Exception("bad proto {}".format(proto))
|
||||
|
||||
os.chdir(fdir)
|
||||
|
||||
name = url.split("?")[0].split("/")[-1]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue