mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-30 05:50:53 +03:00
blockcheck: improve bad redirect detection
This commit is contained in:
parent
86065f25d9
commit
3f44c1320a
@ -154,7 +154,8 @@ curl_test_http()
|
||||
code=$(hdrfile_http_code "$HDRTEMP")
|
||||
[ "$code" = 301 -o "$code" = 302 -o "$code" = 307 -o "$code" = 308 ] && {
|
||||
loc=$(hdrfile_location "$HDRTEMP")
|
||||
[ "${loc#*$2}" = "$loc" ] && {
|
||||
echo "$loc" | grep -qE "^https?://.*$2(/|$)" ||
|
||||
echo "$loc" | grep -vqE '^https?://' || {
|
||||
echo suspicious redirection to : $loc
|
||||
rm -f "$HDRTEMP"
|
||||
return 254
|
||||
|
Loading…
Reference in New Issue
Block a user