mirror of
https://github.com/ProxymanApp/Proxyman.git
synced 2026-04-27 00:55:57 +03:00
[GH-ISSUE #1261] Integer values become float ones by using scripting #1256
Labels
No labels
Discussion
Feature request
In Progress...
Plugins
Waiting response
Windows
Windows
bug
duplicate
enhancement
feature
good first issue
iOS
macOS 10.11
question
wontfix
✅ Done
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Proxyman#1256
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @torokdnl on GitHub (Jun 23, 2022).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1261
Originally assigned to: @NghiaTranUIT on GitHub.
Proxyman version? (Ex. Proxyman 1.4.3)
Proxyman Version 3.6.0 (30600)
macOS Version? (Ex. mac 10.14)
macOS Monterey 12.3.1 (21E258)
macOS Monterey 12.4 (21F79)
Steps to reproduce
Original value: 1655989280365
I can see this value in the following requests like this:
Expected behavior
The original value should be kept until the script modifies it (or the tester manually overwrites it).
@NghiaTranUIT commented on GitHub (Jun 23, 2022):
Look like it's a different issue, when passing this big int to JavascriptCore, it might be converted improperly.
I will check it out 👍
@NghiaTranUIT commented on GitHub (Jun 24, 2022):
@torokdnl please try this beta build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_3.6.0_Fix_scripting_with_big_number.dmg
I redesign the algorithm to make sure it maintains request/response JSON. It works will for big number or float/double too 👍
If you're curious what causes the bug behind the scenes. It's because the JSONSerialization.data(withJSONObject::) poorly convert these NSNumber to String. Thus:
@torokdnl commented on GitHub (Jun 24, 2022):
@NghiaTranUIT -
The build is working correctly, integers remain integers. Thanks a lot for fixing it quickly and for the explanation as well!