From cb461eb752766c34cec422110239fbae4e1765fd Mon Sep 17 00:00:00 2001 From: Tad Fisher Date: Thu, 28 Jun 2018 15:27:34 -0700 Subject: Tolerate base64 padding in secret --- test/insert.t | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') diff --git a/test/insert.t b/test/insert.t index 1c8ddb2..a8c6458 100755 --- a/test/insert.t +++ b/test/insert.t @@ -130,4 +130,13 @@ test_expect_success 'Insert from secret without passfile' ' echo [[ $("$PASS" show Example/alice@google.com) == "$uri" ]] ' +test_expect_success 'Tolerates padding in secret' ' + secret="JBSWY3DPEHPK3PXP==" + uri="otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example" + + test_pass_init && + "$PASS" otp insert -s -i Example -a alice@google.com <<< "$secret" && + echo [[ $("$PASS" show Example/alice@google.com) == "$uri" ]] +' + test_done -- cgit v1.2.3