ProxymanApp / Proxyman

Modern. Native. Delightful Web Debugging Proxy for macOS, iOS, and Android ⚡️
https://proxyman.io
5.69k stars 187 forks source link

Invalid Base64 String #1934

Closed fardage closed 9 months ago

fardage commented 9 months ago

Description

Trying to Base64 decode the following string results in "Invalid Base64 String"

eyJzY2hlbWEiOiJpZ2x1OmNvbS5zbm93cGxvd2FuYWx5dGljcy5zbm93cGxvd1wvdW5zdHJ1Y3RfZXZlbnRcL2pzb25zY2hlbWFcLzEtMC0wIiwiZGF0YSI6eyJzY2hlbWEiOiJpZ2x1OmNvbS5zbm93cGxvd2FuYWx5dGljcy5tb2JpbGVcL2FwcGxpY2F0aW9uX2luc3RhbGxcL2pzb25zY2hlbWFcLzEtMC0wIiwiZGF0YSI6e319fQ

However the string seems to be fine and can be decoded via https://www.base64decode.org/

Steps to Reproduce

  1. Decode the string in the Request Body Window with right click

image

Current Behavior

Expected Behavior

{"schema":"iglu:com.snowplowanalytics.snowplow\/unstruct_event\/jsonschema\/1-0-0","data":{"schema":"iglu:com.snowplowanalytics.mobile\/application_install\/jsonschema\/1-0-0","data":{}}}

Environment

NghiaTranUIT commented 9 months ago

Thanks, let me investigate and fix it asap 👍

NghiaTranUIT commented 9 months ago

@fardage it's fixed: https://download.proxyman.io/beta/Proxyman_5.0.0_Fix_base64_from_Java.dmg

The problem is your Base64 string is encoded by a Java-implementation algo, so it doesn't have suffix padding =. The Beta fixes it 👍

fardage commented 9 months ago

Great! I can confirm that it works with the beta. Thank you for fixing it so quickly!