This changes allows to password protect shares. It works by:
* Allowing to optionally pass a password when creating a share
* If set, the password + salt that is configured via a new flag will be
hashed via bcrypt and the hash stored together with the rest of the
share
* Additionally, a random 96 byte long token gets generated and stored
as part of the share
* When the backend retrieves an unauthenticated request for a share that
has authentication configured, it will return a http 401
* The frontend detects this and will show a login prompt
* The actual download links are protected via an url arg that contains
the previously generated token. This allows us to avoid buffering the
download in the browser and allows pasting the link without breaking
it
@princemaple could you try out this branch to see if it works on your end?
Former-commit-id: 12c782316c411fa3438f167c12634adffb5e1adf [formerly c613ff6624c55292f532d7772e866cf6c81241f5] [formerly 11f03e54dae28fa773227d85259cfd73c5750137 [formerly 9c42269b62]]
Former-commit-id: 04bcf5803397877d00ba48ea6d0b00246dc07b3d [formerly 4c1bb1e95375777aede2c0911bdfa9ce46273b37]
Former-commit-id: 601db641f7d7b01c14903d0cc27085e3d7080c3d
Fixes the error where File Browser would fail when the DB existed with size 0. This closes#628.
@1138-4EB I decided not to check the version for now since it's the first time we're adding that info. Only the next time we change the DB structure we'll use that value as reference to know how to upgrade.
I did not check it because the users running rc1 would have some issues with it.
Former-commit-id: e8b07ab919e9c24feee8f6f2dd6df30df1e2325f [formerly 3396f05b4a1a07e1b993b7c07d1afd2def9cabbb] [formerly b43eb8e400603f99baf7966a58156dec7bd47420 [formerly c1c57c6525]]
Former-commit-id: 1115d0cf8a601feafac2b33cb46b813343f4fa8c [formerly 05de6caf8cf747a95fbb10587f0a767dfb8b8774]
Former-commit-id: 840c1a278cd45d36ce8538b7c5fe97923be05ca3