Submitted by ForkEth, also found by Ch_301, Chom, minhquanym, adriro, csanuragjain, CRYP70, and Lambda
The buy function on the LPDA.sol contract is not validating if the auction is still running, allowing a purchase to be made after the stipulated time. The endtime variable used to store the end date of the auction is not used at any point to validate whether the purchase is being made within the deadline.
The code above shows that even after two days after the endTime it was still possible to make the purchase.
Our recommendation would be to introduce a require to validate if the purchase is being made within the endTime.
The above must be placed at the beginning of the buy function.
mehtaculous (Escher) confirmed and commented:
