9 ms·
EA “Gives Away” 1000s Of Free Games Due To No Server-Side Validation
- minimaxir 14y ago(I apologize in advance for linking to my own blog, but I had not seen this issue reported on any tech blog nor appeared in the "new" queue on HN, so I wrote a quick post this morning on the issue, as it's technically interesting.)
- esrauch 14y agoSorry to comment off of the content of the post, but when I load the page the Like button flickers shown/not shown a bunch of times causing annoying visual jitter. I'm on Chrome 22 if that is relevant.
- minimaxir 14y agoFrom what I can tell, that's on Facebook's end, as all the Facebook plugins seems to flicker occasionally as well. I'll look into it, although there's nothing unusual with my front-end code that should be causing unusual behavior...maybe CloudFlare caching issues? Thanks for letting me know btw. :)
- minimaxir 14y agoI figured out the error (I was wrong, it was indeed my code) and fixed it. No more flickering. :)
- spicyj 14y agoOut of curiosity, what was the bug?
- minimaxir 14y agoOn my main page, I use AJAX to load the Share buttons when the user mouses-over the post itself, so that they aren't loaded all at once. Specifically, it loads the HTML, then runs it through each social service's HTML parser to render the buttons. On individual blog posts, the buttons did not load because the DOM element is not present for that template. However, the parser still ran on mouse-over, which is what caused the flickering. So I just disabled the parser when the user is on an individual blog post.
- spicyj 14y agoGotcha. :)
- gabemart 14y agoIs there a problem with linking to your own blog?
- mparlane 14y agoSelf promotion [of your own blog/site] is frowned upon I believe. We have SHOW HN: for when you want to show something off that you have done. I think it's mainly to stop reporters at Gawker from linking to all their articles though ;)
- ars 14y agoSelf promotion is not frowned upon. As long as the content is good it doesn't matter who submits it.
- artursapek 14y agoRight. People get their friends to link their blogs anyway, I see no difference in effect.
- bryanlarsen 14y agoWhat is frowned upon is blogspam, rewriting somebody else's article and submitting your own version. Original content is always welcome.
- Evbn 14y agoIt doesn't stop. Jen at Betabeat's Reddit-Gawker gawking junk has been on the front page for days.
- deleted 14y ago[deleted]
- rcfox 14y agoThat's okay. You did a better job than what any of the popular tech blogs would have done.
- Negitivefrags 14y ago> The proper way to implement a promo code is logical: when the user attempts to apply a promo code, the server checks, has the user used this promo code before? by querying SELECT FROM transactions WHERE user_id = current_user AND promo_code = “OS3874XVC”. If the result set is empty, then the user hasn’t used the code, and everything’s good to go. Be very careful here, it's not as simple as it looks. If you don't do the correct locking it is very easy to have timing attacks which allow keys to be used twice. We learned this the hard way after posting a one use key for our game on 4chan. A thousand people rushed to try the key and around 100 people managed to get in using it.
- ams6110 14y agoIt really isn't as easy as it sounds, is it? A better approach might be to UPDATE promo_codes SET used = 1 WHERE ... AND used = 0, and then check that one update occurred. Or if your db supports it, SELECT ... FOR UPDATE OF ... and then update if the code is not yet used. You want the check and the update to occur atomically. And this varies depending on databases, for example in Oracle even if you explicitly begin a transaction, a select does not lock the row (unless you specify FOR UPDATE OF) so if you do the check and the update in separate statements, you still have a race condition).
- Negitivefrags 14y agoI actually wasn't personally involved in the solution, but I believe that we went with something involving SELECT FOR UPDATE.
- deleted 14y ago[deleted]
- nvmc 14y agoJust out of interest, what is your game?
- Negitivefrags 14y ago
- NoPiece 14y agoI don't think you have characterized the problem accurately (or at least completely). The coupon allowed you to add dozens of games to your cart, then applied the $20 off to each individual item instead of just one, or against the total. It was a logic problem in applying the coupon on the server side.
- Evbn 14y agoPlease change your CSS so it doesn't force Android to show a microscopic font with long lines and disabled zoom/ reflowing.
- minimaxir 14y agoThe CSS is based off of Bootstrap, so everything should be showing correctly on mobile and tablets (I don't have an Android device myself so I can't verify that particular use case). I'll look into it; in the meantime, I enabled zoom for mobile devices.
- CamperBob2 14y agoin the meantime, I enabled zoom for mobile devices. Whoever turned it off in the first place was a bad person, and should feel bad for doing so.
- minimaxir 14y agoHaving zoom enabled and changing device rotation can cause formatting issues on some devices. The mobile (smartphone) websites of TechCrunch, Yahoo, Cnet, Mashable, etc. all disable mobile zoom. Tablets appear to be a different story though, and zoom might need to be enabled there.
- quotemstr 14y ago> Having zoom enabled and changing device rotation can cause formatting issues on some devices. Then fix your goddamn site instead of gimping the user's web browser.
- Evbn 14y agoPonder this: you have a fixed layout for devices ranging from 3.5in to 10in in size. Assuming you optimized for a he 10in display, does it seem reasonable that the same layout works at 1x and 0.35x zoom level, at all DPI values? Seems best to let users choose to not zoom if their devices are broken, than to tell devices to turn off features. It is a sad bug that my Browser respects requests from web sites to hobble itself. I would rather pan and scan then stare at tiny text. Your site works with zoom now, thank you! TC etc are all websites I don't read on my phone (or at all, generally). Also, your site disabled zoom even when I requested the Desktop version. If you inherited that bug from Bootstrap, that is awful of bootstrap to do.
- andypants 14y agoYour proposed solution is not that simple. You make it sound like EA simply used the wrong query. > One, if EA is technically incompetent enough to allow such a severe bug to exist, they won’t have the technical skills to discern who used the promo code more than once. The bug was not that obvious, and doesn't necessarily imply lack of technical skill. On the other hand, finding out who used a promo code more than once, as long as these things have been logged, should be trivial for any admin.
- ColMustard 14y agoThat a promo code could be used more than once, or that you could use it in ways it was never meant to? Of course the problem it's not simple, but anyone who thinks it is shouldn't be working on these things. Either someone screwed up building the system, or someone thought they could use it in ways it wasn't intended and screwed up. Sure, the solution might not be as simple as a lack of server-side validation, but either way, the solution is simple, the problem isn't.
- catshirt 14y agowhat then, in your opinion, is an "obvious" bug? this is really about as obvious as it gets, from a development and qa perspective.
- ricksta 14y agoI'm not sure if op's solution is optimal. But why not use unique promo code?
- dfox 14y agoUnique promo codes have to be generated somehow. Integrating that generation into probably outsourced survey mechanism is likely not exactly trivial and may (if not done right) open ways for anyone to generate any amount of promo codes they want. This is one kind of problems you get when you start separating different functionality into separate applications that don't known about other parts.
- marek12886 14y agoThe above mentioned approach is significantly simpler to implement and easier to measure (when it works! ha) than uniquely generated promo codes. So you're also looking at a cost/benefit trade off.
- tantalor 14y agoIANAL, but it's possible that these users are now liable to pay for the extra games. They knew that the code was only usable once, yet used it multiple times. EA might ask for the games back or charge the users. (I'm not taking EA's side, I'm just pointing out some possible consequences.)
- spuz 14y agoCan you imagine how much worse EA's image would get if they did that? I'm hoping the PR department will override the legal department in this case.
- rabidsnail 14y agoIf they did try to charge for the games they would get enough chargebacks that they would have a hard time processing credit card payments for a while. And with chargeback penalties they might actually lose money. The only sensible options are a) do nothing or b) revoke games purchased with these codes. If I were them I would do nothing and treat it as an unplanned pricing experiment. Since a lot of these games have an online component (network effects!) the "giveaways" might increase real sales overall.
- oakwhiz 14y agoI doubt there would be chargebacks since a valid credit card was not even asked for during the process of entering the code.
- rabidsnail 14y agoBut presumably you have to have a credit card associated with your account, right?
- potatolicious 14y agoEven if that's the case, it would be unwise for EA to pursue this money. All anyone would have to do is issue a chargeback - which by the way incurs penalty fees for EA. More than that, it costs $25 for EA to file a challenge to a chargeback, making it completely not worthwhile. Going after this money would be a PR disaster, a legal quagmire, financially negative in all likelihood, and permanently damage their relationship with their payment processors. I would instead invest more money in hiring proper architects.
- romaniv 14y agoI think this is the best possible example of why you should always develop websites using progressive enhancement. First, write the app without using any JavaScript. Test it. Make sure the core logic works as intended. Then add JavaScript to make it faster, pretties, simpler to use. That will most likely prevent fuckups such as this, and it will also result in better structured, easier to reason about architecture.
- aero142 14y agoI don't know what this is going to cost EA, but this may end up being a good thing. People hate Origin but more importantly, all their games are already on Steam, so they just continue to buy from Valve. This might get a few people to keep Origin installed on their computer and help the Origin network effect out. Up until now, EAs only strategy has been to make their big name franchises Origin exclusive. This will probably work better and may not end up costing them much.
- deleted 14y ago[deleted]
- brainfed 14y agoThey actually pulled most of their top titles off Steam when Origin launched. Mass effect, Dragon Age etc. If you already own them on Steam then they remain in your library but you can't buy them on there anymore.
- bluedanieru 14y agoDragon Age 1 and Mass Effect 1 & 2 are still available on Steam. Interestingly, they pulled Crysis 2 then a few months later added Crysis 2 Maximum Edition. For Dragon Age 2 and Mass Effect 3, I agree with their reasoning. Steam doesn't allow in-app purchases that circumvent their distribution system, and that's a load of crap.
- brainfed 14y agoYou're right - seems it was just Dragon Age 2 that they pulled. My bad! I thought I was only seeing them because I already owned them.
- batiudrami 14y agoCrysis 2 came back once no more DLC was going to be released - hence 'maximum edition'. The no in-app purchases which don't cut in Steam was introduced when they began allowing free-to-play games on the service (which are usually monetised by microtransactions, and would be a money-loser for Valve if they didn't make a cut from them). I don't know why Steam can't make an exception for EA titles (or those purchased from the store rather than F2P), but that's the reasoning.
- SquareWheel 14y agoThis article missed the earlier Reddit thread where a separate exploit was discovered, that the coupon applied to every item in the basket. $20 off of everything. Coupled with a coupon from a different forum you could add tens or maybe hundreds of games to your account for free in one large bundle. I'm really curious to see EA's response.
- deleted 14y ago[deleted]
- fwr 14y agoDo you have a link to the earlier reddit thread?
- SquareWheel 14y agoI do. http://reddit.com/11ecl5/ http://reddit.com/11ecl5/ The link to the SlickDeals exclusive deals were removed as well for some reason. http://store.origin.com/store/ea/en_US/DisplayCategoryProductListPage/categoryID=60109000&childCategoryID=60109000&OfferID=29945460209?sourceid=Origin_AFF_LS715 http://store.origin.com/store/ea/en_US/DisplayCategoryProduc...
- prezjordan 14y agoSo because of DRM, they're fully capable of taking those games "back" (removing them from accounts), right? I mean, if VALVe one day decided I no longer can have TF2 they can simply strip it from account, is that how their terms work?
- skymt 14y agoYes and yes. Valve has been known to remove games from Steam accounts in cases of abuse, e.g. credit-card fraud or stolen license keys.
- doesnt_know 14y agoI've never heard of Valve removing single games from an account before. It's common knowledge though that if you ever do a charge back for a purchased game they shut down your account and it becomes irrecoverable. It's a blanket policy and a reason why I never use Paypal for Steam, use a real or "throw-away" credit card for Steam purchases. Alternatively, you could not buy from Steam at all, I don't anymore but it's too late for me. I already have over 200 games with them and worry about losing access to everything.
- skymt 14y agoThe only case I know for certain that Valve removed a single game from accounts was the time a large number of Dirt 3 keys were leaked from a graphics card promotion. A friend traded a game for one of the stolen keys, not knowing about the leak. About a day later, the game disappeared from his library with no fanfare. He didn't even get an email from Valve. I've also heard that Valve will remove games that were acquired through the trade system if the original buyer obtained them fraudulently.
- cyber 14y agoIronically, EA will probably try to claim the "success" of the promo by using numbers for all the games claimed as if they were all discrete individuals. While at the same time trying to claw back the licenses.
- deleted 14y ago[deleted]
- tlrobinson 14y ago"pretty embarrassing for an exploit that causes a significant amount of lost revenue" I doubt much revenue was lost. How many of these people were going to buy the game in the first place? None of them were hot new games, were they?
- deleted 14y ago[deleted]
- dagrz 14y agoIs it me or does the author of this article, and the abusers of the exploits he writes about, land on the wrong side of both the law and common morality? Surely EA being a "terrible company" has nothing to do with whether it is okay to steal their products? Moreover, just because there was a coding error/oversight, again doesn't mean it is okay to steal their products? If you have a complaint about a company or discover an exploit, surely there are other more ethical channels to pursue the matters? For the record, I dislike some of EA's conduct as much as the next person.
- minimaxir 14y agoI don't approve of abusing the exploit, and I did not abuse the exploit. I put that paragraph in because I thought it was interesting that some people were indeed using that argument as justification for using the promo multiple times.
- dkokelley 14y agoYes this rubs me the wrong way. I think it's analogous to a retail store (say, an Apple store) leaving their front door unlocked overnight. It's possible to go in and take merchandise. After all, it's not your fault they left their front door open. You could even argue that Apple's business practices are morally questionable, so they deserve to be taken advantage of . (I'm not trying to make any statement about Apple. It's for the analogy.) You could argue that the situation is different with virtual goods, since they have an incredibly low marginal cost, but I think that the situations are morally analogous. The games aren't supposed to be free.
- glesica 14y agoNot really. It's more like Apple issuing you a coupon for a free iPod Nano, but when you go to checkout with the iPod Nano and a Macbook in your cart, the cashier tells you they're both free. It may still be unethical, my point is just that there are shades of gray here.
- sespindola 14y ago
- dkokelley 14y agoCan this really be considered lost revenue? It's unlikely that all 1,000's of the "free" games were going to be purchased at the current price. You run in to the same questions with piracy. Were the pirates really going to pay if they couldn't pirate? The lost revenue should really only come from customers who would have paid the asking price but managed to get an illegitimate deal, plus whatever support and overhead costs can be applied to the game downloads.
- ntkachov 14y agoYes because some (most of the ones worth paying for) of the games require some sort of server. So every new player in a game is not free for EA. Giving away a game means they will lose money on this person if they play online.
- timmclean 14y agoAlthough, that'd be an increase in expenses, not lost revenue...
- jklp 14y agoIf you're nitpicking, then I guess technically it's a loss on profit ...
- trhtrsh 14y agoNo, the point is that for these users, the vendor loses the $1 or whatever worth of hosting costs, not the $50 or whatever retail price.
- belorn 14y agoThe costs are also very difficult to determine, where $1 sounds a bit high to me. Lets try to do some random estimates for a random game: 30% of the users wont touch the game whatsoever, and will just have it on their "list". Of the buyers, 0.5% will require some sort of support effort in relation , where 65% are handled by the auto-response and 30% by the first email by an employe. Say a total of 5,000 downloads are from this "free" coupon for any specific game title. Would $500 or $5000 sound closers to the actually hosting/support cost that the publisher has.
- elliottcarlson 14y ago"One, if EA is technically incompetent enough to allow such a severe bug to exist, they won’t have the technical skills to discern who used the promo code more than once." Not necessarily true - we don't have insight in to how their system is setup; and while it may not be tracking redemption of the codes on that level, it could also be attached to any transactional data that they have in place (for reporting purposes etc).
- TwoBit 14y agoAlso, it's likely the person(s) who set up that promo had little to do with the people who maintain Origin. And may not even be related to those who maintain the server.
- chris11 14y agoAccording to a community manager. EA is honoring all sales made with the coupon. I was kind of expecting EA to ban some people or revoke access to some games. But I guess they just ended the promotion early. Although EA does seem to be getting some complaints from people who filled out the survey and didn't get to use the coupon. http://forum.ea.com/eaforum/posts/list/60/9040620.page http://forum.ea.com/eaforum/posts/list/60/9040620.page
- minimaxir 14y agoThat appears to be the case. I've updated the post accordingly.
- xedarius 14y agoI'd say it worked out pretty well, I'd never heard of EA's Origin service before this article.
- atas 14y agoThis is just another sample case demonstrating how otherwise intelligent and competent people really need to be educated about web development security.
- ragsagar 14y agoi can't believe that they don't know what is server side validation.
- ragsagar 14y agoi can't believe that they don't know what is server side validation.