You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The expected behavior is that users should only have access to the trial period once for a set duration (e.g., 3 days) and should not be able to exploit the trial period by continuously uninstalling and reinstalling the application to reset the trial days.
Current Behavior
Currently, users can exploit the trial period calculation by continuously uninstalling and reinstalling the application within a 24-hour period. This allows them to gain unlimited trial days because the dates are stored only on a day-level basis, ignoring hours and minutes.
Failure Information
This issue arises because the date and time are recorded only at the day level. Users can uninstall and reinstall the application within a 24-hour period to abuse the trial period. This allows them to repeatedly reset the trial period to the full duration (e.g., 3 days).
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
This function only calculates the trial days at the day level, ignoring hours and minutes. As a result, in the above scenario, each reinstallation provides the user with a new full 3-day trial period.
Root Cause
The root cause is storing dates only at the day level and not capturing hours and minutes, preventing accurate calculation of the trial period. The following image clearly illustrates this issue:
Proposed Solution
We can provide a more accurate calculation by storing the date and time information with minute-level precision, and adjusting the remainingTrialDaysFromCancel function accordingly. If you give me your thoughts, I would like to contribute to solving the problem.
Context
Package Version: 21.0
Laravel Version: 10.10
PHP Version: 8.3
The text was updated successfully, but these errors were encountered:
Expected Behavior
The expected behavior is that users should only have access to the trial period once for a set duration (e.g., 3 days) and should not be able to exploit the trial period by continuously uninstalling and reinstalling the application to reset the trial days.
Current Behavior
Currently, users can exploit the trial period calculation by continuously uninstalling and reinstalling the application within a 24-hour period. This allows them to gain unlimited trial days because the dates are stored only on a day-level basis, ignoring hours and minutes.
Failure Information
This issue arises because the date and time are recorded only at the day level. Users can uninstall and reinstall the application within a 24-hour period to abuse the trial period. This allows them to repeatedly reset the trial period to the full duration (e.g., 3 days).
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
Step 1: Install the application.
Step 2: Uninstall the application on the same day.
Step 3: Reinstall the application the next day.
Step 4: Repeat the uninstall and reinstall process to continuously gain a new trial period.
Current Function
laravel-shopify/src/Services/ChargeHelper.php
Line 290 in 91995ac
This function only calculates the trial days at the day level, ignoring hours and minutes. As a result, in the above scenario, each reinstallation provides the user with a new full 3-day trial period.
Root Cause
The root cause is storing dates only at the day level and not capturing hours and minutes, preventing accurate calculation of the trial period. The following image clearly illustrates this issue:
Proposed Solution
We can provide a more accurate calculation by storing the date and time information with minute-level precision, and adjusting the remainingTrialDaysFromCancel function accordingly. If you give me your thoughts, I would like to contribute to solving the problem.
Context
The text was updated successfully, but these errors were encountered: