diff --git a/CHANGELOG.md b/CHANGELOG.md index b22b7f448..756d26d09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog Fab-manager +- The upgrade script will check and report the ability to access the hub API - Fix a bug: the upgrade script report an invalid version to upgrade to +- Fix a security issue: updated tar to 6.1.11 to fix [CVE-2021-37712](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-37712), [CVE-2021-37701](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-37701) and [CVE-2021-37713](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-37713) ## v5.1.10 2021 October 04 diff --git a/setup/upgrade.sh b/setup/upgrade.sh index e6fc7f26f..c1676b191 100644 --- a/setup/upgrade.sh +++ b/setup/upgrade.sh @@ -89,6 +89,11 @@ target_version() if [[ "$TAG" =~ ^:release-v[\.0-9]+$ ]]; then TARGET=$(echo "$TAG" | grep -Eo '[\.0-9]{5}') elif [ "$TAG" = ":latest" ] || [ "$TAG" = "" ]; then + HTTP_CODE=$(curl -I -s -w "%{http_code}\n" -o /dev/null https://hub.fab-manager.com/api/versions/latest) + if [ "$HTTP_CODE" != 200 ]; then + printf "\n\n\e[91m[ ❌ ] Unable to retrieve the last version of Fab-manager. Please check your internet connection or restart this script providing the \e[1m-t\e[0m\e[91m option\n\e[39m" + exit 3 + fi TARGET=$(\curl -sSL "https://hub.fab-manager.com/api/versions/latest" | jq -r '.semver') else TARGET='custom'