In-depth lesson · Business logic
Typical fixes
Every point the Business logic reports back under this heading, best-backed first, each with the reports it is seen in.
-
Use the same withdrawal fee formula in the withdraw function and the preview function.
Seen in 1 report
-
Use unpredictable codes and rate limit code entry.
-
Validate that the bid amount equals the listed price and restrict the recipient.
Seen in 1 report
-
Validate that the longest continuous frozen span plus the final mark's age stays within the freshness limit.
-
Validate that the permitted_roles parameter contains a known, valid role ID.
Seen in 1 report
-
Validate that the provided increases are reasonable relative to the pool's state.
Seen in 1 report
-
Validate that the recipient address is not the zero address.
Seen in 1 report
-
Medium
-
-
Validate the amount as a number before it reaches the transfer model and reject UI-only sentinels from external input.
Seen in 1 report
-
Validate the captcha cookie value and tie it to a solved challenge.
Seen in 1 report
-
Validate the interest to pay specified by the caller.
-
Validate the payment source before delivering the gift.
Seen in 1 report
-
Validate username characters on the server, not only in the browser.
Seen in 1 report
-
Verify a successful payment server-side before crediting a balance, and ignore client-supplied amount and threshold.
-
Verify ownership of the channel and use a single server-side source for the channel identifier.
-
Verify payment succeeded and that the plan is valid for the user before activating.
Seen in 1 report
-
Verify promo code validity server-side and keep the signup state on the server rather than trusting the response.
-
Verify server-side that the user is entitled to the domain through purchase or ownership before attaching it.
Seen in 1 report
-
Verify that submitted scripts match the referenced Bitcoin transaction scripts.
-
Verify that the claimed change address belongs to the signing wallet before signing.
-
Verify that the initial depositor is the caller.
Seen in 1 report
-
Verify that the market is in a Trading state before applying coverage.
Seen in 1 report
-
Verify that the source account's asset matches the asset being traded.
Seen in 1 report
-
Verify the paid subscription server-side before storing the custom field.
-
Verify the triggering pool is the officially listed pool before crediting rewards.
-
Verify the user's entitlement or payment before granting a paid tier.
Seen in 1 report
-
Whitelist which fields the client may set and keep pricing fields server-owned.
-
Withdraw remaining assets from the old dispatcher before revoking its allowance.
Seen in 1 report