Skip to content

Comment on 6pm.com's 1.6 million dollar pricing mistakeparent

Comments

Something along the lines of this, abstracted away a few layers, would be my guess.

    def build_query()
      "UPDATE prices SET price=4995 #{where_clause}"
    end
    def where_clause() # only set prices on products in our group of stuff to sell
      return "oops, I'm accidentally an empty string"
    end
Unfortunate bug causes method to fail silently, program does not crash, instead performs unfortunately incorrect query.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.