transfer.sh icon indicating copy to clipboard operation
transfer.sh copied to clipboard

Add an option to password protect a file

Open CodeCubeNeo opened this issue 2 years ago • 7 comments

I think it would be awesome if we could restrict unknown users from even downloading a file (not just encryption). I think the easiest way is that if the uploader wants, he can set a password, and if the downloader wants to have that file, he should enter that password.

CodeCubeNeo avatar Jun 03 '22 10:06 CodeCubeNeo

The 'password' is part of the URL in form of the random key, isn't it?

toastie89 avatar Sep 07 '22 18:09 toastie89

I guess yes, but you can guess that (although nearly impossible). You can close this and thanks for taking the time to answer my question ;).

CodeCubeNeo avatar Sep 07 '22 18:09 CodeCubeNeo

For me the 6 characters also feel a bit short. I run an own instance of transfer.sh and set random-token-length to 20.

toastie89 avatar Sep 07 '22 20:09 toastie89

So 20 lenght is default for transfer.sh?

CodeCubeNeo avatar Sep 08 '22 11:09 CodeCubeNeo

@CodeCubeNeo

it's one of the example on the frontend:

# Encrypt files with password using gpg
$ cat /tmp/hello.txt|gpg -ac -o-|curl -X PUT --upload-file "-" https://transfer.sh/test.txt

# Download and decrypt
$ curl https://transfer.sh/FPbp5w/test.txt|gpg -o- > /tmp/hello.txt

aspacca avatar Sep 08 '22 11:09 aspacca

So 20 lenght is default for transfer.sh?

No, this is what I've set for my own installation. The default is 6.

toastie89 avatar Sep 08 '22 11:09 toastie89

maybe change deafult to 10 or more? Just an idea.

CodeCubeNeo avatar Sep 08 '22 15:09 CodeCubeNeo

maybe change deafult to 10 or more? Just an idea.

I will do

aspacca avatar Dec 22 '22 09:12 aspacca

Great. always better to change security for the better over 4 characters (possible combos rise from 36^6 to 36^10 (36 is the number of possible characters only alphanumeric) which is quite a lot). Math is probably not right, but I still threw it there.

CodeCubeNeo avatar Dec 22 '22 10:12 CodeCubeNeo

fixed in #162 162

aspacca avatar Mar 10 '23 17:03 aspacca