psi-4ward / psitransfer

Simple open source self-hosted file sharing solution.
BSD 2-Clause "Simplified" License
1.49k stars 217 forks source link

Hide copy to clipboard on one-time download #142

Closed crusaider closed 2 years ago

crusaider commented 3 years ago

Hi!

For security resons, the copy to clipboard feature is disabled on one-time-download buckets.

This will prevent someone from getting the contents of, for example a text file without discarding the bucket.

psi-4ward commented 2 years ago

Does not make much sense for me and PsiTransfer is not the intended to transfer high-security content without pre-encryption.

crusaider commented 2 years ago

I can appreciate that. But the main reason is not to ensure "end to end" encryption but rather to make sure that the sender can know that the file has been downloaded only once.

psi-4ward commented 2 years ago

I dont understand what v-if="file.previewType" impacts this. After a successful download stream the file gets deleted: https://github.com/psi-4ward/psitransfer/blob/master/lib/endpoints.js#L253

crusaider commented 2 years ago

Ok - had a look in the code again (i has been a while). I realize now that the Copy to Clipboard only copies the URL. I was under the impression that the actual file content was copied. Then I agree that removing the button makes no sense.