server icon indicating copy to clipboard operation
server copied to clipboard

update procedure breaks bitwarden.sh if Github servers don't respond as expected

Open w4rs3n opened this issue 6 years ago • 1 comments

I have a simple cron job that executes bitwarden.sh updateself and bitwarden.sh update every two hours, to keem the system up to date. After it ran the last time, my bitwarden.sh was broken - it only contained this line:

500: Internal Server Error

Fixing it was quite simple (just downloaded the current version with wget -qObitwarden.sh https://raw.githubusercontent.com/bitwarden/server/master/scripts/bitwarden.sh), but I stronlgy recommend changing the update process to something like:

  1. download the new file with a temporary file name
  2. verify the file's consistency (i.e. by comparing it's sha256 hash)
  3. actually replace the old file with the downloaded file

w4rs3n avatar Apr 21 '20 18:04 w4rs3n

This just happened again.

w4rs3n avatar Apr 23 '20 15:04 w4rs3n