Test number of times a function can be used limits (OTG-BUSLOGIC-005)

Brief Description
Many of the problems that applications are solving require limits to the number of times a function can be used or action can be executed. Applications must be “smart enough” to not allow the user to exceed their limit on the use of these functions since in many cases each time the function is used the user may gain some type of benefit that must be accounted for to properly compensate the owner. For example: an ecommerce site may only allow a discount to be applied once, or some applications may be on a subscription plan an only allow users to download or upload three complete documents monthly.

Issue
Attackers may be able to circumvent the business logic and execute a function more times than “allowable” exploiting the application for personal gain.

Example
Suppose an ecommerce site allows users to take advantage of any one of many discounts on their total purchase and then proceed to checkout and tendering. What happens of the attacker navigates back to the discounts page after taking and applying the one “allowable” discount? Can they take advantage of another discount?

Testing Method
•	Study the applications logical requirements. •	The user will find each place in the application that entries can be made or changed. •	With this list the user will try to manipulate the application by exercising/using a function more than the allowable number of times.

Test Tools
None

Related Test Cases
TBD

Remediation
The application should have checks to ensure that the business logic is being followed and that if a function can only be executed a certain number of times, when the limit is reached the user can no longer execute the function. To prevent users from using a function over the appropriate number of times the application may use mechanisms such as cookies to keep count or through sessions not allowing users to access to execute the function additional times.