Inputting decimal value to shop item quantity gives full item at half price
|
03-09-2016 10:36 PM
|
![](image.php?s=e4c51dc7f4c3fa2c8f9ad9f0893eeda2&u=15011&dateline=1397181910) |
Member
|
|
Inputting decimal value to shop item quantity gives full item at half price
An admin on another site that is using the mysidia script informed me of this bug.
If a user puts in 0.5 as an item quantity in the shops, they pay half price but get the full item. This bug can be severely exploited if users were to find out.
|
|
Issue Details
|
Category Unknown
Status Unconfirmed
Priority 3
Affected Version Mys v1.3.4
Fixed Version Mys v1.3.5
Users able to reproduce bug
2
Users unable to reproduce bug
0
Assigned Users
(none)
Tags
(none)
|
|
04-07-2016 02:14 AM
|
![](image.php?s=e4c51dc7f4c3fa2c8f9ad9f0893eeda2&u=15011&dateline=1397181910) |
Member
|
|
|
Just a little love tap to see if this is being looked into or anything?
|
04-20-2016 10:18 PM
|
![](image.php?s=e4c51dc7f4c3fa2c8f9ad9f0893eeda2&u=15299&dateline=1459894859) |
Member
|
|
|
Open class_itemshop.php
Under the purchase function where you see the else replace this:
PHP Code:
else {
$item->quantity = $mysidia->input->post("quantity");
with this:
PHP Code:
else {
$item->quantity = (int) $mysidia->input->post("quantity");
For good measure open class_stockitem.php and replace line 37, which is this:
PHP Code:
if(empty($quantity)) $quantity = $mysidia->input->post("quantity");
with this:
PHP Code:
if(empty($quantity)) $quantity = (int) $mysidia->input->post("quantity");
This is only a partial fix. It will continue to display the wrong values to the user, but should correctly charge them now.
|
04-22-2016 11:28 PM
|
![](image.php?s=e4c51dc7f4c3fa2c8f9ad9f0893eeda2&u=15011&dateline=1397181910) |
Member
|
|
|
Ahhh thank you thank you! <33
|
All times are GMT -5. The time now is 11:26 PM.
Currently Active Users: 652 (0 members and 652 guests)
Threads: 4,081, Posts: 32,025, Members: 2,016
Welcome to our newest members,
jolob.