Skip to content

Commit 70d99bd

Browse files
committed
When using an encrypted csv the last character before the padding is
left out.
1 parent 9083b3c commit 70d99bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gauth.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ func main() {
5656
mode := cipher.NewCBCDecrypter(block, iv)
5757
mode.CryptBlocks(rest, rest)
5858
// Remove padding
59-
i := len(rest) - 1
60-
for rest[i] < 16 {
59+
i := len(rest)
60+
for rest[i-1] < 16 {
6161
i--
6262
}
6363
cfgContent = rest[:i]

0 commit comments

Comments
 (0)