-
-
Notifications
You must be signed in to change notification settings - Fork 725
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Entering "'20.0%'" as payment method fee causes server error #6942
Comments
@mkllnk does this one occur for all negative figures? If so it can be a bigger problem than an s4 :( |
|
No, actually, there is not asterisk. The mistake was to add single quotes: |
*-20.0
as payment method fee causes server error
Can I pick this up? |
I just assigned you this issue. You can pick it up 😄 |
To close this issue, other payment methods (other then Check) should be considered:
Also, all calculator types should be considered:
Combinations of the above should be considered when testing. |
Description
Updating a payment method can cause a server error when entering invalid values.
It looks like someone tried to give a 20% discount by entering that value.
Expected Behavior
Invalid values should not be allowed or there should be a proper error message.
Actual Behaviour
It shows the snail.
Steps to Reproduce
'20.0'
with the single quotes as fee amount.Animated Gif/Screenshot
Workaround
Severity
bug-s1: a critical feature is broken: checkout, payments, signup, login
bug-s2: a non-critical feature is broken, no workaround
bug-s3: a feature is broken but there is a workaround
bug-s4: it's annoying, but you can use it
bug-s5: we can live with it, only a few users impacted
https://github.com/openfoodfoundation/openfoodnetwork/wiki/Bug-severity
Your Environment
Possible Fix
The only figures that should be allowed are:
The error message should read:
Invalid input. Please use only numbers. For example: 10, 5.5, -20
Error in OpenFoodNetwork
ArgumentError in spree/admin/payment_methods#update
invalid value for BigDecimal(): "'-20'"
View on Bugsnag
Stacktrace
View full stacktrace
Created by Maikel via Bugsnag
The text was updated successfully, but these errors were encountered: