MineWeb / MineWebCMS

🚀 A French Minecraft CMS since 2015 (used by +1k websites)
https://mineweb.org
GNU General Public License v3.0
92 stars 41 forks source link

[BUG] Shop vouchers injection flaw #278

Closed wildmaster84 closed 3 years ago

wildmaster84 commented 3 years ago

Using a json format such as {\n gives 100% off on any shop item.

The voucher discount system allows code injection.

To Reproduce | Pour reproduire le bug go to your /shop and for the voucher code use "{\n" and click purchase.

Steps to reproduce the behavior: | Étapes pour reproduire le bug :

  1. Go to '/shop'

  2. Click on 'Shop item'

  3. Scroll down to 'text box below price'

  4. Enter '{\n' and click purchase

Expected behavior | Ce qui aurait dû se passer

To return an error that says the code is invalid

Screenshots

image

MineWeb (please complete the following information):

nivcoo commented 3 years ago

I just looked at it is only visual there is the money that is taken

wildmaster84 commented 3 years ago

Yes exactly, it should take 15.00 but takes 0.

nivcoo commented 3 years ago

No, it takes 15.00 if the item is 15.00

wildmaster84 commented 3 years ago

No, it takes 15.00 if the item is 15.00

yes i know but the bug lets you get the item for free

nivcoo commented 3 years ago

I just tested with the bug, if I do the bug it displays 0 but it still takes the money from the item because the display is in javascript that's all