From a9a4792854d985bef4f661a6bcef5360b11bff73 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Tue, 18 Aug 2020 18:01:53 +0000 Subject: [PATCH] Fix server validation --- gofile.io-dl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gofile.io-dl b/gofile.io-dl index 1dd1654..a9328c0 100755 --- a/gofile.io-dl +++ b/gofile.io-dl @@ -17,7 +17,7 @@ else fi server="$(curl -s "https://apiv2.gofile.io/getServer?c=${code}" | python3 -c 'import json,sys; print(json.loads(sys.stdin.read().strip())["data"]["server"])')" -if [[ "${server}" != srv-file?? ]] +if [[ ! "${server}" =~ ^srv-file[0-9]+$ ]] then echo "Unexpected server value: ${server}" >&2 exit 1