Skip to content

Commit

Permalink
Fix broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
liamg committed Dec 28, 2020
1 parent dc23aea commit ead7a2d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/app/pax/exploit.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (x *exploiter) decode(input []byte) ([]byte, error) {
decoded, err := url.QueryUnescape(string(input))
return []byte(decoded), err
case EncodingBase64:
var dst []byte
dst := make([]byte, base64.StdEncoding.DecodedLen(len(input)))
_, err := base64.StdEncoding.Decode(dst, input)
return dst, err
case EncodingBase64URL:
Expand Down
2 changes: 1 addition & 1 deletion internal/app/pax/exploit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func Test_DecryptViaCookie(t *testing.T) {
result, err := Decrypt(ts.URL, encodedCipherText, &ExploitOptions{
BlockSize: aes.BlockSize,
Cookies: "ENC=" + encodedCipherText,
Encoding: EncodingBase64URL,
Encoding: EncodingBase64,
})
require.NoError(t, err)

Expand Down
File renamed without changes.

0 comments on commit ead7a2d

Please sign in to comment.