From 8058fa47785727cf2ccda375a5bd01677d615ec1 Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Fri, 21 Mar 2025 23:43:53 -0700 Subject: use patch instead --- .../0001-Fix-HOTP-counter-increases.patch | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 any/pass-otp-git/0001-Fix-HOTP-counter-increases.patch (limited to 'any/pass-otp-git/0001-Fix-HOTP-counter-increases.patch') diff --git a/any/pass-otp-git/0001-Fix-HOTP-counter-increases.patch b/any/pass-otp-git/0001-Fix-HOTP-counter-increases.patch new file mode 100644 index 0000000..897492d --- /dev/null +++ b/any/pass-otp-git/0001-Fix-HOTP-counter-increases.patch @@ -0,0 +1,25 @@ +From 0447ae4fa84def63d6ce97c251ea3fa5af0dcc07 Mon Sep 17 00:00:00 2001 +From: Juan Orti Alcaine +Date: Sat, 5 Nov 2022 07:45:25 +0100 +Subject: [PATCH] Fix HOTP counter increases + +--- + otp.bash | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/otp.bash b/otp.bash +index a0688d2..a58a96c 100755 +--- a/otp.bash ++++ b/otp.bash +@@ -370,7 +370,7 @@ cmd_otp_code() { + + if [[ "$otp_type" == "hotp" ]]; then + # Increment HOTP counter in-place +- local line replaced uri=${otp_uri/&counter=$otp_counter/&counter=$counter} ++ local line replaced uri=${otp_uri/&counter=$otp_counter/"&counter=$counter"} + while IFS= read -r line; do + [[ "$line" == otpauth://* ]] && line="$uri" + [[ -n "$replaced" ]] && replaced+=$'\n' +-- +2.49.0 + -- cgit v1.2.3-70-g09d2