Skip to content

[FIX] High severity - #26

Merged
neto737 merged 6 commits into
mainfrom
fix/high-severity
Oct 18, 2026
Merged

neto737 merged 6 commits into
mainfrom
fix/high-severity

Conversation

@neto737

@neto737 neto737 commented Oct 18, 2026

Copy link
Copy Markdown
Owner

No description provided.

GET query strings now send booleans as "true"/"false" instead of 1/0.
setVelocityPolicyRule, updateVelocityPolicyRule and removePolicyRule put the
rule ID where the wallet ID belongs, so every call hit the wrong URL.

Move the test reflection helpers into a shared trait.
10 ETH in wei is above PHP_INT_MAX, so int amounts overflowed. sendTransaction
now takes an int or a string of digits, and sendTransactionToMany and
buildTransaction send each recipient amount as a string.

Add BitGoSDK::toBaseUnits() and fromBaseUnits() for exact conversion at any
number of decimals. toSatoshi() and toBTC() now use them: toSatoshi() accepts
strings and no longer breaks under locales with a decimal comma, and toBTC()
no longer round-trips through a float.

BCMath is no longer used, so ext-bcmath is no longer required.
Requests had no timeout and could hang forever. Both clients now default to a
10 second connect timeout and a request timeout of 60 seconds (BitGoSDK) or
310 seconds (BitGoExpress, just over Express's own 305 seconds). Change them
with setTimeout() and setConnectTimeout().

A cURL failure, a non-2xx status or an invalid JSON body used to come back as
null or as BitGo's raw error body. They now come back as
['error' => ..., 'status' => ...], keeping any other fields BitGo sent, so
existing isset($r['error']) checks keep working. The status is 0 when the
request never got a response. buildTransaction and signBuildTransaction
return the same fields as an object.
It has had no effect since PHP 8.0, and on 7.4 the handle is freed when it
goes out of scope.
@neto737
neto737 merged commit b1ac69d into main Oct 18, 2026
23 checks passed
@neto737
neto737 deleted the fix/high-severity branch October 18, 2026 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant