ProxymanApp / Proxyman

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

[BUG] App crash when setting invalid Query in Breakpoint or Scripting #2091

Open NghiaTranUIT opened 2 months ago

NghiaTranUIT commented 2 months ago

Description

if the user sets an invalid query in the Scripting, the app will crash (AppCenter shows it)

LAST EXCEPTION BACKTRACE
CoreFoundation
__exceptionPreprocess
libobjc.A.dylib
objc_exception_throw
Foundation
-[__NSConcreteURLComponents setPercentEncodedQuery:]
Foundation
merged function signature specialization <Arg[0] = Owned To Guaranteed> of Foundation.URLComponents.scheme.setter : Swift.String?
Foundation
Foundation.URLComponents.percentEncodedQuery.setter : Swift.String?
ProxymanCore
(extension in ProxymanCore):Foundation.URL.replaceAllQueries([ProxymanCore.HeaderEntry]) -> Swift.String? URL+Utils.swift:35

Steps to Reproduce

  1. Make a Breakpoint or Scripting
  2. Set Query = name=⚡️%20Proxyman

Current Behavior

Expected Behavior

Environment

NghiaTranUIT commented 2 months ago

Fixed: https://download.proxyman.io/beta/Proxyman_5.6.1_Fix_crash_with_invalid_query.dmg