Skip to content

Commit 80b51a3

Browse files
committed
feat: prevent modifying ~/.wget-hsts
Signed-off-by: Lucas Larson <LucasLarson@riseup.net>
1 parent 0380a67 commit 80b51a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

update

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env sh
2-
update='2023-10-26'
2+
update='2023-10-29'
33
IFS="$(command printf -- ' \t\n|')" && IFS="${IFS%'|'}"
44
command printf -- '\n\n .___ __\n __ ________ __\174 _\057____ _\057 \174_ ____\n\174 \174 \134____ \134 \057 __ \174\134__ \134\134 __\134\057 __ \134\n\174 \174 \057 \174_\076 \076 \057_\057 \174 \057 __ \134\174 \174 \134 ___\057\n\174____\057\174 __\057\134____ \174\050____ \057__\174 \134___ \076\n \174__\174 \134\057 \134\057 \134\057\n a Lucas Larson production\n\n' >&2 && command sleep 1
55
command printf -- '\360\237\223\241 verifying network connectivity' >&2
@@ -18,7 +18,7 @@ command printf -- '\n\n' >&2
1818
case "${SHELL##*/}" in *"${0##*-}") return "${update:-1}" ;; *) exit "${update:-1}" ;; esac
1919
}
2020
set -- 'https://lucaslarson.net/update'
21-
command test "$({ command wget --output-document=- --quiet -- "${1-}" || command curl --location --silent -- "${1-}"; } 2>/dev/null | command sed -n -e '/update=/ {' -e 's/[^[:digit:]]//gp' -e 'q' -e '}')" -le "$(command printf -- '%s\n' "${update-}" | command sed -e 's/[^[:digit:]]//g')" || {
21+
command test "$({ command wget --hsts-file=/dev/null --output-document=- --quiet -- "${1-}" || command curl --location --silent -- "${1-}"; } 2>/dev/null | command sed -n -e '/update=/ {' -e 's/[^[:digit:]]//gp' -e 'q' -e '}')" -le "$(command printf -- '%s\n' "${update-}" | command sed -e 's/[^[:digit:]]//g')" || {
2222
command printf -- 'An update to this updater is available\041 Download it from here:\n%s\n' "${1-}" >&2
2323
update=''
2424
unset -v -- update 2>/dev/null

0 commit comments

Comments
 (0)