Add an option to password protect a file #104

Closed
opened 2026-01-19 18:28:58 +00:00 by michael · 10 comments
Owner

Originally created by @CodeCubeNeo on GitHub.

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.

Originally created by @CodeCubeNeo on GitHub. 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.
Author
Owner

@CodeCubeNeo commented on GitHub:

So 20 lenght is default for transfer.sh?

@CodeCubeNeo commented on GitHub: So 20 lenght is default for transfer.sh?
Author
Owner

@CodeCubeNeo commented on GitHub:

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 commented on GitHub: 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 ;).
Author
Owner

@toastie89 commented on GitHub:

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

@toastie89 commented on GitHub: The 'password' is part of the URL in form of the random key, isn't it?
Author
Owner

@paolafrancesca commented on GitHub:

@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
@paolafrancesca commented on GitHub: @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 ```
Author
Owner

@toastie89 commented on GitHub:

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 commented on GitHub: 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.
Author
Owner

@toastie89 commented on GitHub:

So 20 lenght is default for transfer.sh?

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

@toastie89 commented on GitHub: > So 20 lenght is default for transfer.sh? No, this is what I've set for my own installation. The default is 6.
Author
Owner

@paolafrancesca commented on GitHub:

fixed in #162 162

@paolafrancesca commented on GitHub: fixed in #162 162
Author
Owner

@CodeCubeNeo commented on GitHub:

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

@CodeCubeNeo commented on GitHub: maybe change deafult to 10 or more? Just an idea.
Author
Owner

@CodeCubeNeo commented on GitHub:

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 commented on GitHub: 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.
Author
Owner

@paolafrancesca commented on GitHub:

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

I will do

@paolafrancesca commented on GitHub: > maybe change deafult to 10 or more? Just an idea. I will do
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dutchcoders/transfer.sh#104