1. l0wD

    l0wD - Dec 5, 2017 New Member VIP Member

    Credit
    Point
    Hi there,

    i encountered a bug with the current store framework. I dont know if its the store or the store user upgrade plugin, but i was able to subscribe to user upgrade products in the store with 0 coins. Gifting the upgrade worked as expected (not enough founds error).
    So i checked the source files and found:

    brivium/store/controller/public/product.php

    line 33:
    $remained = $productPurchaseModel->checkUserMoney($userId, $product, $visitor);
    if($remained < 0) {
    return $this->responseError(new XenForo_Phrase('BRS_not_enough_money_to_purchase', array('money' => Brivium_Store_EventListeners_Helpers::helperStoreCostFormat($product['cost_amount'], $product['product_id'], $product['money_type'], $product['currency_id'], $product))));
    }

    EDIT: (stolen from actionGift() on line 85):
    if(!$remained = $productPurchaseModel->checkUserMoney($userId, $product, $visitor))
    {
    return $this->responseError(new XenForo_Phrase('BRS_not_enough_money_to_purchase', array('money' => Brivium_Store_EventListeners_Helpers::helperStoreCostFormat($product['cost_amount'], $product['product_id'], $product['money_type'], $product['currency_id'], $product))));
    }


    Now it works like a charme :)
    #bugbounty ?

    best regards!
     
    Loading...
  2. fresh calendar

    fresh calendar - Dec 18, 2017 New Member

    Credit
    Point
    it works like a charme :)
     
    l0wD likes this.
    #2
  3. Farhan Thakur

    Farhan Thakur - Feb 19, 2019 New Member

    Credit
    Point
    thanks for sharing :)
     
    #3