[MIRROR] Fixes negative payment in NTpay & Encodes name param sent to admins in fax [MDB IGNORE] (#17729)

* Fixes negative payment in NTpay & Encodes name param sent to admins in fax (#71491)

## About The Pull Request
NTpay wasn't validating negative input serverside, allowing for negative
payment to users(Negative - Negative = Positive, so it adds money to the
senders account.) Also encodes a parameter that was sent unsanitized to
admins.
## Why It's Good For The Game
## Changelog
🆑
fix: Fixes a NTPay exploit.
/🆑

* Fixes negative payment in NTpay & Encodes name param sent to admins in fax

Co-authored-by: CocaColaTastesGood <47264839+CocaColaTastesGood@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-11-24 23:13:16 +01:00
committed by GitHub
parent 861db9f912
commit 9f06f26ee5
3 changed files with 12 additions and 12 deletions
@@ -42,7 +42,7 @@
if(!recipient)
return to_chat(usr, span_notice("The app can't find who you're trying to pay. Did you enter the pay token right?"))
if(!current_user.has_money(money_to_send))
if(!current_user.has_money(money_to_send) || money_to_send < 1)
return current_user.bank_card_talk("You cannot afford it.")
recipient.bank_card_talk("You received [money_to_send] credit(s). Reason: transfer from [current_user.account_holder]")