diff options
author | jaseg <git@jaseg.net> | 2019-06-25 14:22:13 +0900 |
---|---|---|
committer | jaseg <git@jaseg.net> | 2019-06-25 14:22:13 +0900 |
commit | fb2f3bcc2a6ec010e1ffc33b78833234f57da11a (patch) | |
tree | 7609c1a54ae9c263e4f4b1be747ef5e7c2d49017 /encrypt.py | |
parent | 0ad5efec388db4f8e9233f4dfd5de716f680549e (diff) | |
download | secure-download-fb2f3bcc2a6ec010e1ffc33b78833234f57da11a.tar.gz secure-download-fb2f3bcc2a6ec010e1ffc33b78833234f57da11a.tar.bz2 secure-download-fb2f3bcc2a6ec010e1ffc33b78833234f57da11a.zip |
Verify download filenames in URL
Diffstat (limited to 'encrypt.py')
-rw-r--r-- | encrypt.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -14,6 +14,7 @@ if __name__ == '__main__': print(f'{infile} is not a file or directory, exiting.') os.exit(2) - file_id, token = encrypt_file(args.infile) - print(f'/{file_id}/{token}/{os.path.basename(args.infile)}') + download_filename = os.path.basename(args.infile) + file_id, token = encrypt_file(args.infile, download_filename) + print(f'/{file_id}/{token}/{download_filename}') |