Server-Side Processing of Negative Transaction Amounts in /init_tx
The /init_tx endpoint accepts and processes negative cryptocurrency amounts server-side instead of rejecting invalid financial input during transaction calculation.
A POST request containing a negative value in the from_amnt parameter is accepted by the backend application and results in a successful redirect response.
Example request parameter:
from_amnt=-2
Observed server response:
302 Found
Location: /?calc=1&from_currency=bitcoin&to_currency=monero&from_amnt=-2&rate_type=dynamic
The application then renders the calculation page using the negative amount value instead of returning a validation error.
Impact:
Although no transaction order was ultimately created, the backend still processes invalid negative financial input. This may lead to:
- inconsistent transaction calculation behavior
undefined accounting states
unreliable downstream processing
future logic abuse if additional functionality is introduced
Expected Behavior:
The server should reject any transaction amount less than or equal to zero before calculation or redirect logic occurs.
Recommendation:
Implement strict server-side numeric validation on all transaction amount parameters and return an explicit validation error for invalid financial values.