Slashdot Mirror


AJAX May Be Considered Harmful

87C751 writes "Security lists are abuzz about a presentation from the 23C3 conference, which details a fundamental design flaw in Javascript. The technique, called Prototype Hijacking, allows an attacker to redefine any feature of Javascript. The paper is called 'Subverting AJAX' (pdf), and outlines a possible Web Worm that lives in the very fabric of Web 2.0 and could kill the Web as we know it."

308 comments

  1. first post by Anonymous Coward · · Score: 5, Funny

    So can I hijack slashdot to always get the first post?

    1. Re:first post by spion666 · · Score: 1

      Hi jax.

    2. re: first post by jimbojw · · Score: 4, Interesting
      You might - if you can find an available XSS vulnerability to use as a vector. TFA assumes this blithely for the sake of demonstration, but it's a big assumption.

      Further, the slashdot summary suggests that Prototyping is a design flaw in JavaScript/ECMAScript. This wrong for two reasons:
      1. The article doesn't mention this.
      2. Prototyping is not a design flaw.
      Prototyping is a very useful language feature that can be used to do all sorts of things that would otherwise be cumbersome or impossible. Ruby is a prototyped language - a feature which is responsible for much of the 'magic' of Rails.

      The article does outline a number of Ajax related vulnerabilities, but like most vulnerabilities, they can be mitigated or avoided entirely if paid attention to - much like the SQL injections of old.

      Arguing that Prototyping or Ajax makes JavaScript unsafe is fud. These are powerful language features that (like any powerful feature) can be used for evil if an injection mechanism is available.
    3. Re: first post by Crayon+Kid · · Score: 4, Insightful
      [..]if an injection mechanism is available.
      Therein lies the cruft of the issue. XSS is the culprit, not Ajax, not prototyping, not JavaScript itself. It all comes down to incompetent developers allowing visitors to inject JavaScript that other visitors will execute. Period. Once custom JS is executed all bets are off, assume the worst.

      This is an extremely basic point in security of any kind: once the attacker is executing code inside your system, that's bad. Nevermind that fact that other limiting factors will mitigate the range of the attack (browser-only for JavaScript, account-permissions-only for other attacks). Most efforts should be made to prevent intrusion, not to limit damage after the attacker is "in".
      --
      i ate crayons when i was a kid and now i have two braincells and the blue ones taste nicer
    4. Re: first post by SporkLand · · Score: 1

      I think you are confusing to uses of the term Prototype:
      1. There is prototype, the javascript library/framework, that makes it nicer to work in javascript. Rails utilizes the prototype library for their main javascript helpers.

      2. Javascript uses a prototype based programming model versus a class based programming model.

      Ruby most definitely uses a class based programming model.

      What is interesting is that Prototype the library makes working in javascript more "class" like as people tend to prefer that way of working. Not to mention adding a ton of other useful methods.

    5. Re: first post by moro_666 · · Score: 1

      couldn't really agree more here :)

      a) imagine that a banner hack or html injection will let someone else's code "prototype" your login classes of ajax :) he'd run away with loads of information making the "saving queries" to somewhere else, and since the server never knew this taking place, buyakasha, info is out & nobody has any idea where it went.

      b) imagine that your customer was stupid enough to use his admin account from a box that infected with a prototyping virus /worm/bugabuse before... without his knowledge a lot of hidden actions can take place, without anyone being aware of it, data can be stolen, data can be changed, and all of that with the knowledge of a little script kiddie (it doesn't really take an alan to figure out how javascript works, any 12 year old can do it)

      with all the sanity in one's mind, i think people should ban internet banking in years to come, for right now this is the "front" of hackers/crackers, a front that with a keylogger worm or a prototyping your xml query classes is as easy to break as my resistance to coffee. speaking of which ...

      --

      I'd tell you the chances of this story being a dupe, but you wouldn't like it.
    6. Re: first post by phaggood · · Score: 1

      >This is an extremely basic point in security of any kind: once the attacker is executing code inside your system, that's bad

      Y'know, sometimes I think it's just me being paranoid, then I get a blast of fresh air from somebody else paying attention.

      When in the NINE WORLDS is it good to let users of a publically-facing system upload runnable code? The last PHP-related problem I had with Mambo was thus; you could add code that allowed you to upload executable scripts to the web dir. That's just DUMB - DUMB - DUMB - so freakin' dumb that I didn't even assume, after putting a honeypot, two firewalls and port forwarding between my server and the 'net, that I'd need to dissect the PHP/Mambo install to make sure this wasn't possible. It's freakin' PHP4, fer crissakes; I'm SURE there's no way such a hole could still exist!

      A month later and PHP exposes me for the freak-tard that I am for drinking THAT kool-ade.

  2. Nothing for you to see here. Please move along. by mobby_6kl · · Score: 3, Funny

    Not surprising considering that slashdot is slowly trying to AJAXify itself...

  3. The sky is falling! by udderly · · Score: 2, Funny

    Haven't RTFA yet, but I doubt it will live up to the hype.

    1. Re:The sky is falling! by Tablizer · · Score: 4, Funny

      Haven't RTFA yet, but I doubt it will live up to the hype.

      Which hype, AJAX itself or AJAX ending the world?

      Does Al Gore know anything about this?

    2. Re:The sky is falling! by zendiego · · Score: 1

      cmon, stop with the Al Gore funny talk, he was just KIDDING! get it...AL-GORE-ITHM...he still gets geeks heated up over that joke...JESUS! FIND YOUR BRAIN!

    3. Re:The sky is falling! by Anonymous Coward · · Score: 0

      Of course he does, he invented the Internet!

  4. "Considered Harmful" by JoshJ · · Score: 4, Insightful

    Javascript vulnerabilities will stop people from using AJAX just like Word vulnerabilities will stop people from using Microsoft Office.

    1. Re:"Considered Harmful" by cnettel · · Score: 2, Informative
      Well, ever since Word 97, there have been features intended to let the user disable auto-running macros. That's also been the default. This is not really a problem, as most Word files should not contain macros. Even if they do, most files are still useful without them, and are probably used within the context of a controlled intranet (with code signing in place). If the view that Javascript is inherently impossible to make secure would gain ground, AJAX would go the way of ActiveX controls.

      Now, I know you said vulnerabilities, but I wanted to point out that some parts of the Office functionality has already been removed this way. Javascript off by default for unknown sites has so far been a "geeky" attitude, the web would certainly change if that attitude would turn into norm.

    2. Re:"Considered Harmful" by Anonymous Coward · · Score: 0

      Those word problems are not about macros, but exploits based on faulty file parsing code.

      So even with macros of, you can get hit.

    3. Re:"Considered Harmful" by pimpimpim · · Score: 1
      the web would certainly change if that attitude would turn into norm.

      After 'change' you forgot to include 'for the better' :)

      --
      molmod.com - computing tips from a molecular modeling
    4. Re:"Considered Harmful" by Idbar · · Score: 1

      Boy! Yeah. Even though it's harmful as it says here, I don't get why people keep using this Ajax thing!


      Slashdot, now with bleach!

    5. Re:"Considered Harmful" by leenks · · Score: 1

      I'm not sure about that. Most of the Word documents I have to use at work are full of word macros which fill in bits of the document for me, or run a whole bunch of stuff that would take 200 billion mouse clicks to achieve otherwise. I suspect a lot of other large corporate users are in the same boat.

      Of course, in my case at least, this is because the wrong tool was used for the job. A word processor and email shouldn't be doing such "online" forms in the first place.

    6. Re:"Considered Harmful" by jellomizer · · Score: 2, Insightful

      Boo Hoo. You hate new technologies so you get modded insightful.
      I really don't see what there is this huge hatred towards Javascript. Javascript and now AJAX (which is just a method of using JavaScript) Is actually one of the best combining server and client side applications, that will work multi-browers and multi-platform. As well the band with savings can be good because you will only send the information you need once. Things like Flash, JavaApplets, Active X are good examples of a bad attempt to make the web more application like, because they all require either special browsers, 3rd party plugins from companies who own the rights to it and they are in a binary format which for many cases makes the application a lot bigger and more bandwidth. JavaScript with AJAX method actually really allows Web Based applications to work well and be used by people wether they are running Linux, OS X, Windows, FreeBSD or almost any other Operating System. As Well AJAX development can be used on any web server. It is actually a very liberating development platform. Yes it is ugly development, and feels kinda like a hacked method of working. But so far it is the best that we have without having to go 3rd party for an extra layer of processing.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    7. Re:"Considered Harmful" by triffid_98 · · Score: 1
      Actually, I'd say Flash does a damn fine job in it's more recent editions. You do need a plug-in, but there's been good support for all of the major operating systems for some time now. Since you are working through a plug-in, there is a lot less to worry about when it comes to the different browsers. They all work exactly the same, and provide a far richer GUI than anything you'll get out of HTML/CSS.

      As someone who has worked with DHMTL/client XML requests in the past, differences in browser support can be positively nightmarish. Only a subset of CSS/Javascript is supported across all the major browsers, and if you want more than that you'll end up writing or licensing reams of custom javascript to sniff browsers and use the hack that happens to work on that particular OS/browser rev. Active X is obviously not cross platform. Java applets are, but you'll be limited to Java 1.0/AWT if you want to support every browser. Between that and the sandbox issues, it's a non-starter for most of us.

      Things like Flash, JavaApplets, Active X are good examples of a bad attempt to make the web more application like, because they all require either special browsers, 3rd party plugins from companies who own the rights to it and they are in a binary format which for many cases makes the application a lot bigger and more bandwidth. JavaScript with AJAX method actually really allows Web Based applications to work well and be used by people wether they are running Linux, OS X, Windows, FreeBSD or almost any other Operating System.
    8. Re:"Considered Harmful" by Anonymous Coward · · Score: 1, Insightful
      You do need a plug-in, but there's been good support for all of the major operating systems for some time now.


      Are you using a different definition of good than I am?
      Just for clarities sake, I think I will use webster's definition as a reference:

      1 a (1) : of a favorable character or tendency

      Have you ever used the linux flash plugin? Things tend not to work. Have a nonstandard soundcard? NOPE. Not gonna work. Want to view things from the latest version of flash? Try again later. Want to use a non mozilla browser? There might be a compatability layer you could try. Have a 64bit processor? Run your browser in 32bit. Want to be guaranteed future updates? There is a possibility, we even have a small team. Don't have an x86 processor? Use an emulator or something.
    9. Re:"Considered Harmful" by Anonymous Coward · · Score: 0
      > Well, ever since Word 97, there have been features intended to let the user disable auto-running macros. That's also been the default. This is not really a problem, as most Word files should not contain macros. Even if they do, most files are still useful without them, and are probably used within the context of a controlled intranet (with code signing in place). If the view that Javascript is inherently impossible to make secure would gain ground, AJAX would go the way of ActiveX controls.

      Macros-off has been the default since Word97. Problem is, it was a gaping hole for years before then.

      The second problem is... you're absolutely right. Javascript is as impossible to secure as Word macros. Mixing executable content with static documents is wrong, and it's as wrong for Javascript-into-an-HTML-parsing-engine as it was for Word/Excel-macros-into-an-office-suite-parsing-eng ine.

      The saddest thing is that the people who implemented Javashit in the mid-90s didn't fucking learn from the mistakes of the decade past: Just because it's cute doesn't mean it won't kill you.

      > Javascript off by default for unknown sites has so far been a "geeky" attitude, the web would certainly change if that attitude would turn into norm.

      Unfortunately, it would come about 10 years, and 100,000,000 botnet zombies, too late.

      Don't even get me started on Flash. I wonder how many holes Adobe/Macromedia have paid crackers to keep their mouths shut about.

    10. Re:"Considered Harmful" by ralphdaugherty · · Score: 1

      Actually, I'd say Flash does a damn fine job in it's more recent editions.

            And as far as AJAX goes, they say they support it. I also read that SAP has chosen it as their browser interface, which is significant.

        rd

    11. Re:"Considered Harmful" by WNight · · Score: 1

      And really, just being able to communicate with the server and change something is the important thing. This is what changes the "business logic", the rest is just window dressing. When there's an implementation difficulty in an area it's usually better if the developer avoid that feature instead of trying to make it work. Perhaps text won't rollover, or align in some way, but better than it looks a little clunky for everyone than not work for anyone.

    12. Re:"Considered Harmful" by Peter+La+Casse · · Score: 1
      I really don't see what there is this huge hatred towards Javascript.

      Security. Within a walled garden it's great, but out on the wild woolly internet it's safest to disable by default or run within a virtual machine.

  5. Web 2.0.1 by ticklish2day · · Score: 5, Funny

    Patch the hole and release Web 2.0.1. Good thing there's already a Web 3.0 in the works.

    1. Re:Web 2.0.1 by The+Bubble · · Score: 3, Funny

      Not even! Microsoft just released Internet 7.0. All you Mozilla fanboys need to catch up with the times and replace your kiddy 'nix boxes with the new Vista.

      </joke>

    2. Re:Web 2.0.1 by pkaral · · Score: 1

      Oh MAN, are you behind...

  6. Greasemonkey? by Mitchell+Mebane · · Score: 1, Interesting

    Isn't this the thing that forced the redesign of Greasemonkey a while back?

    --

    The roots of education are bitter, but the fruit is sweet.
    --Aristotle
    1. Re:Greasemonkey? by JackHoffman · · Score: 4, Informative

      No, Greasemonkey exposed security sensitive functions to websites. They were meant to be used by Greasemonkey scripts but websites had access too.

      This is about the way Javascript implements object oriented programming: In Javascript you don't define classes from which objects are instantiated. In a nutshell, you create prototype objects and new objects are copies of the prototypes. The "attack" is to change existing prototypes. For example, you can add a new function to the String prototype or replace an existing function with your own implementation. Every String object then gets the new function. There is one problem with this: Cross site checks don't apply. A script from one site can't simply communicate with another site, but it can modify the prototypes that the scripts from the other site use and subvert the communication of the other script with its host.

    2. Re:Greasemonkey? by gkhan1 · · Score: 1

      That's.... I mean.... WOW! Thank you for explaining.

    3. Re:Greasemonkey? by suv4x4 · · Score: 5, Insightful

      There is one problem with this: Cross site checks don't apply.

      You didn't test that and just assumed it's true I guess. But if they applied, and each page context runs in its own sandbox with its own version of String, Number, and so on, you'd sound pretty stupid right?

      Try it yourself, the prototypes are NOT shared. They are not shared even among two page tabs on the same domain.

      In fact not shared even among two instances of the SAME PAGE.

      Embarassing, I guess, for all modded 5+ claiming this on this article.

    4. Re:Greasemonkey? by Anonymous Coward · · Score: 0

      This is about a script subverting scripts which are loaded from other hosts and are running in the same page sandbox. That aspect is only part of the story. The paper also (vaguely) describes methods by which an attacker can insert scripts into arbitrary hosts through a particular type of browser vulnerability.

    5. Re:Greasemonkey? by suv4x4 · · Score: 1

      This is about a script subverting scripts which are loaded from other hosts and are running in the same page sandbox.

      Yup, but for this to happen you need to somehow make the page load your script. The methods described in the paper don't do this by some JS weakness. Instead request splitting, XSS and some other common and well known techniques were described.

      Every time a page itself loads a script, it owns the whole page, not just the prototypes but absolutely everything in this page. So I miss the brilliance of this specific way of sniffing information out of a page via proto hacks.

    6. Re:Greasemonkey? by JackHoffman · · Score: 1

      In fact I have tested it. It works as advertised, but apparently you don't understand the problem. Of course that doesn't stop you from deriding a correct and concise summary.

      Before you embarass yourself any further, please do read the paper and try for yourself if a script can sniff the communication of a script from a different domain (which runs on the same page) and also intercept the communication and thereby talk to the domain of the other script from which it would normally be forbidden by security rules. For the sake of this argument, the malicious script gets to run first, because that is in line with the attack vectors which are described in the rest of the paper.

    7. Re:Greasemonkey? by suv4x4 · · Score: 1

      Before you embarass yourself any further, please do read the paper and try for yourself if a script can sniff the communication of a script from a different domain (which runs on the same page)

      Stop for a second and think about what you just said: which runs on the same page.

      You need to get it running on the same page. Now read the same paper you're pushing in my face and tell me what breakthrough way of attacking a foreign page do you see there related to JS prototypes WITHOUT having compromised the page in any other "classical" and well known way (split requests, XSS etc.).

      Also, while you're whining about how foreign domain scripts can access your page, again, stop, and think a bit. How does this foreign domain script get included on the page? Most likely by a snippet like this one:

      [script src="www.domain.com"][/script]

      This according to you is Very Evil and should not be allowed. But the attacked already can write this snippet up there, so instead of including a foreign script, he could just insert it right there in the snippet:

      [script]

      EVIL CODE
      EVIL CODE

      [/script]

      And then what good is that it can't run scripts from other domains?

      I suggest your read through this several times before/if you reply.

    8. Re:Greasemonkey? by Anonymous Coward · · Score: 0

      So I miss the brilliance

      Obviously.

    9. Re:Greasemonkey? by Omnifarious · · Score: 1

      Can you put up a page that demonstrates this?

    10. Re:Greasemonkey? by Anonymous Coward · · Score: 0

      The paper contains all the information you need (with code snippets). I'm not going to spoonfeed the script kiddies.

    11. Re:Greasemonkey? by JackHoffman · · Score: 1

      Look, it took you three tries to even understand what is being attacked. Don't you think YOU need to take a step back and think about what one could do with this in a Web 2.0 environment? I mean, the paper actually hints at the chain of events which becomes possible by being able to craft requests to a third party domain from within the user's browser. You just have to read and understand it.

    12. Re:Greasemonkey? by 2fuf · · Score: 1

      well, as I understand, the brilliance is that the malicious script, loaded into the page context by a conventional means of XSS or whatever, now could be able to reach beyond the sandbox it's supposed to be confined in. it does this by screwing up the prototypes. but, please don't kill me if I'm wrong

    13. Re:Greasemonkey? by Anonymous Coward · · Score: 0

      Javascript has been the source of most browser vulnerabilities, second only to ActiveX, and they're usually in the form of sandbox escapes. It's also the engine of an interactive and responsive web. But what do I know? Look at the moderation: "If you load foreign scripts you're screwed anyway" gets modded up and factual information about a sandbox escape gets modded down. Made me remember why I gave up on my <200000 account. Bunch of ignoramuses around here.

    14. Re:Greasemonkey? by suv4x4 · · Score: 1

      well, as I understand, the brilliance is that the malicious script, loaded into the page context by a conventional means of XSS or whatever, now could be able to reach beyond the sandbox it's supposed to be confined in. it does this by screwing up the prototypes. but, please don't kill me if I'm wrong

      Well, nope. That's not the thing since when you can access a page's code you already are outside the sandbox. Prototypes changes nothing.

    15. Re:Greasemonkey? by 2fuf · · Score: 1

      You're not able to reach pages in other tabs or windows, but with this you can.

    16. Re:Greasemonkey? by Anonymous Coward · · Score: 0

      No, you can't. You can reach servers in other domains. That's dangerous enough and therefore normally forbidden, even for scripts which are directly injected into a website.

  7. A bit over the top... by Sloan47 · · Score: 4, Insightful

    "...and could kill the Web as we know it." Oh come on! Isn't that exaggerating a tad? Obviously with some browser patches and more secure server code, the problem is solved. Gotta love sensationalism!

    1. Re:A bit over the top... by mctk · · Score: 1

      No. It won't be okay. The internets will die.

      It's been fun intar-web! We've had some good times! Never let go!

      --
      Paul Grosfield - the quicker picker upper.
    2. Re:A bit over the top... by Sloan47 · · Score: 1

      Damn, I thought if the countless articles on Britney Spears' party habits didn't kill the Internet, nothing would.

    3. Re:A bit over the top... by vtcodger · · Score: 1
      ***"...and could kill the Web as we know it."***

      Would that necessarily be a bad thing? [And yeah, I agree that the statement is a bit hyperbolic].

      --
      You can't see ANYTHING from a car, You've got to get out of the goddamned contraption and walk...Edward Abbey
  8. notabug by QuoteMstr · · Score: 3, Insightful

    This paper is absolutely ridiculous, and its author is scaremongering --- if you have access to a site's scripting system via some cross-site vulnerability, then you don't _need_ to subvert an object's prototype to change its behavior. If you're relying on client-side code of any sort, be it written in Javascript or C, for security, you're up a creek without a paddle anyway. Oh nooes, man in the middle proxy attacks! Oh noes, browser bugs allowing javascript to leak outside its security context! There is no security vulnerability in this paper that hasn't been known and worked around for years. I'm wondering what kind of agenda the author has in writing this, actually.

    1. Re:notabug by kfg · · Score: 2, Funny

      This paper is absolutely ridiculous, and its author is scaremongering

      He's obviously been watching to much local weather forecasting lately:

      "Scattered showers in the afternoon; Save the women and children!"

      The Society of Hysteria really is getting to be a bit much.

      KFG

    2. Re:notabug by mctk · · Score: 5, Funny

      Society of Hysteria? SOCIETY OF HYSTERIA? aaaaaaaaah! SAVE YOURSELF!

      --
      Paul Grosfield - the quicker picker upper.
    3. Re:notabug by coma_bug · · Score: 5, Informative

      I'm wondering what kind of agenda the author has in writing this, actually.

      page 3
      This technique has been found by S. Di Paola and is called Prototype
      Hijacking
      . It represents the state of the art in hijacking
      techniques applied to the Javascript language.

      page 6
      This new kind of attack has been called AICS and has been thought by S.
      Di Paola and G. Fedon and developed by S. Di Paola.

      page 8
      Stefano Di Paola. Senior Security Engineer of proved experience, works
      since many years as an IT consultant for private and public companies.
      He teaches Database Programming and Information Security at the
      University of Florence. Since 1997 is a well known security expert; he
      found many of the most dangerous vulnerabilities in recent releases of
      MySQL and PHP. From 2004 his researches focused mainly on Web security.
      Actually he is part of OWASP (Open Web Application Security Project)
      team and he's the focal point of Ajax security for the Italian Chapter.

      He is the creator of http://www.wisec.it/

      Giorgio Fedon. Currently employed as senior security consultant and
      penetration tester at Emaze Networks S.p.a, delivers code auditing,
      Forensic and Log analysis, Malware Analysis and complex Penetration
      Testing services to some of the most important Companies, Banks and
      Public Agencies in Italy. He participated as speaker in many national
      and international events talking mainly about web security and malware
      obfuscation techniques. During his past job he was employed at IBM
      System & Technology Group in Dublin (Ireland).

      Actually he is part of Owasp (Open Web Application Security Project)
      Italian Chapter.

    4. Re:notabug by stonecypher · · Score: 4, Informative

      This paper is absolutely ridiculous, and its author is scaremongering

      Try reading the paper before lambasting it. The stuff you saw in the slashdot article isn't in the paper. The author of the paper says things like "innovative new attack" and "next generation of server side injection." The stuff about end of the web as we know it is from the slashdot poster. The paper is quite insightful, and the author is almost blase about the whole thing. It's quite clear that he simply believes he's unearthed a new form of attack, and he's in fact quite correct.

      Please get off of your soapbox. You're wrong.

      --
      StoneCypher is Full of BS
    5. Re:notabug by suv4x4 · · Score: 0

      The paper is quite insightful, and the author is almost blase about the whole thing. It's quite clear that he simply believes he's unearthed a new form of attack, and he's in fact quite correct.

      Would you let me know what's new in XSS? All the paper describes are pedestrian ways to sniff info out of a site via existing XSS exploit.

      The sniffing examples he shows are not an attack in any way. The XSS allowing him to run those examples are that attack. And XSS is by no means new, or "fundamental flaw" of JS.

      When XSS can occur, it's an implementation flaw of the browser and/or site, and by no means "fundamental" as it's usually fixed in the next point release or site update.

      Fundamental would mean it can't be fixed, and if you BS detectors aren't screaming by his paper, you're more gullible than you suspect.

    6. Re:notabug by coma_bug · · Score: 2, Informative

      Try reading the paper before lambasting it. Well I have read the paper and it is absolutely ridiculous. If the attacker can inject JavaScript or HTML or whatever into the connection it doesn't matter whether the site is Web 1.0, Web 2.0 or Web 3.14159 because the session is compromised anyway. If you want web security you'll need TLS.

    7. Re:notabug by radtea · · Score: 0

      There is no security vulnerability in this paper that hasn't been known and worked around for years.

      As I understand it the attack describes in the paper proceeds as follows:

      User visits malicious site A, which has all kind of cool AJAX stuff and incidentally redefines the HttpXMLRequest prototype.

      User then visits some inoccuous site, like Yahoo mail, that uses all kinds of cool AJAX stuff and creates a new HttpXMLRequest object from the corrupt prototype, which results in all of their communciations being copied to the evil hacker that set up the malicious site.

      This does not require any access to the inoccuous site's scripting system. All it requires is that the user visit the two sites in sequence without closing their browser.

      I may be completely misunderstanding the nature of the attack, but this is what the paper seems to be describing. But assuming I've characterized it correctly I'm curious as to what the known work around for this is (or conversely, interested in understanding what the proposed attack really involves.)

      --
      Blasphemy is a human right. Blasphemophobia kills.
    8. Re:notabug by Myen · · Score: 3, Interesting

      Except that when you visit site B, the browser discards all JS from site A before going to site B. Site B never sees any JS objects from A anyway. Think of the browser-supplied things (e.g. the XMLHttpRequest constructor) as a template; if you modify it you just get a copy of the template for yourself.

      If touching prototypes of built-in objects would persist across sites there simply could not have been more than one JS framework system. And nobody would have had scripting enabled... :)

    9. Re:notabug by Anonymous Coward · · Score: 1, Informative
      The author of the paper says things like "innovative new attack" and "next generation of server side injection."

      The author of the paper says things like "this bug will allow you to run arbitrary JavaScript code in the context of any website, and all you need to do to exploit it is to find a way to run arbitrary JavaScript code in the context of any website".

      Plus, half the code they give to hijack the XMLHttpRequest object doesn't even work. Do these guys even know JavaScript? Have they tested it, like, AT ALL?
    10. Re:notabug by kfg · · Score: 1

      I'm a vegetarian and all, so I can't say I exactly approve, but pull yourself together man, they're just planning a pig roast.

      Oh, wait, are you a . . . ?

      Nevermind.

      KFG

    11. Re:notabug by stonecypher · · Score: 4, Insightful

      Would you let me know what's new in XSS? All the paper describes are pedestrian ways to sniff info out of a site via existing XSS exploit.

      The thing which is novel in this paper is the delivery mechanism, specifically by fundamentally replacing parts of javascript to carry attacks in what would otherwise be quite clean and legitimate code. The only parallel I can think of is the embedded-in-compiler attack that was referred to by the Guy Steele era TNHD as "the greatest hack ever," wherein the foreign code installed itself into anything compiled by said compiler, including new iterations of said compiler. (By the by, I can think of several hacks I think are better; I just mentioned the phrase because most people know to what that refers.)

      And XSS is by no means new, or "fundamental flaw" of JS.

      I'm not sure why you keep talking about XSS. XSS prototype overloading attacks are just his first example of something you could deploy over his new attack vector. The paper isn't about the XSS attack at all. It's not the payload he's talking about, it's the delivery mechanism. You might consider re-reading. I mean, come on, he even cites someone named "S. Di Paola" (near the top of the second column on page three of the PDF) as the person who came up with the XSS attack he uses as an example, and the XSS attack starts right after the header "advanced example". Why are you suggesting he claimed that was new?

      As far as whether prototype overloading is a fundamental flaw of javascript, from the security perspective the current implementation most certainly is. There is no mechanism to identify whether a fundamental library feature has been replaced, or whose implementation you're using. There is not yet an existing mechanism by which an application can defend itself from this kind of attack; this must be defended against by the runtime environment instead, and there are not currently any runtime environments which defend against this sort of thing. Indeed, some of the JavaScript libraries I use rely on that those features are replacable (specifically prototype, moofx, behaviour and dojo, though I know of quite a few other libraries which do it too.) MooFX adds a ton of new features to fundamental things like Objects, Arrays and Strings that I use all the time.

      The same mechanism Moo uses to extend things could be used to extend bad things into place. The XSS attack is just an example. It's the extension he's talking about. It wouldn't be hard to "extend" a "logging" mechanism into XMLHttpRequest; indeed I did that once as a debugging tool. What if said logging mechanism logged to a foreign server? There are a million ways to exploit this.

      When XSS can occur, it's an implementation flaw of the browser and/or site, and by no means "fundamental" as it's usually fixed in the next point release or site update.

      You seem to have entirely missed the point. The thing this paper describes is an attack mounted by a malicious site against later sites in the user's browsing path, not an attack mounted against a site with a flaw. This attack leverages a flaw in current browser implementations of JavaScript in such a way that there need not be a flaw in the remote site, and it is neither possible for a remote site to detect or resist such attacks.

      The fundamental flaw is not in Javscript. It's in current implementations of Javascript. You are confusing mechanisms and targets. Yes, the target of this attack is other sites, but the mechanism has nothing to do with the target, and there's nothing the target can do. It's a browser-side attack.

      Fundamental would mean it can't be fixed

      Yes and no. It's fundamental *to* *current* *implementations* of the language, not the language itself. So yes, it cannot be fixed, *in* *current* *implementations*; it requires a minor new implementation strategy on the part of browser vendors. This will end up requiring a security patch to all browsers (and probably three to IE.)

      and if you BS detectors aren't screaming by his paper, you're more gullible than you suspect.

      Please re-read the paper. You seem to have missed the point.

      --
      StoneCypher is Full of BS
    12. Re:notabug by ubernostrum · · Score: 1

      The paper is quite insightful, and the author is almost blase about the whole thing. It's quite clear that he simply believes he's unearthed a new form of attack, and he's in fact quite correct.

      No, the author has not actually unearthed anything new; the mutability of object prototypes is a well-known and well-understood aspect of JavaScript. The potential to cause unexpected behavior by changing the prototypes of built-in objects is likewise well-known and well-understood (and has been a source of complaint against a number of JavaScript libraries -- Prototype, for example, used to extend some of the built-ins in ways which changed the behavior of expected language features).

      Neither of these things are new. The idea of using them to launch an attack, by altering the behavior of existing objects so that trusted JavaScript behaves differently than expected, may possibly be new but I wouldn't be surprised if the idea's been had before. In either case, it requires an existing, fully-exploitable cross-site scripting vulnerability to exist before this technique can work (otherwise, the code which modifies existing object prototypes will not be loaded or executed), so the author has essentially said that "if your site has a cross-site scripting hole in it, I can exploit it with cross-site scripting". Which is news to no-one; in fact, it's a tautology.

    13. Re:notabug by stonecypher · · Score: 1

      Neither of these things are new. The idea of using them to launch an attack, by altering the behavior of existing objects so that trusted JavaScript behaves differently than expected, may possibly be new

      The possibility of using them to launch an attack is what he's claiming is new, and I've never heard of it before. This is something I keep up with, so I'm going to remain somewhat firm in my belief that this is an insightful paper until someone shows me prior exposition.

      --
      StoneCypher is Full of BS
    14. Re:notabug by suv4x4 · · Score: 3, Insightful

      As far as whether prototype overloading is a fundamental flaw of javascript, from the security perspective the current implementation most certainly is. There is no mechanism to identify whether a fundamental library feature has been replaced, or whose implementation you're using.

      Repeat after me: client-side, interpreted language.

      You're loading SOURCE CODE on a machine you DO NOT CONTROL.

      In other words, the fact you can "hijack" prototype methods is not a major discovery, since you can actually modify the actual *source code* itself, the classes instantiated can be replaced with other classes, variables can be read and written, instances can be destroyed and replaced.

      This is what "scripting" is about. If you don't like it and you're juggling with sensitive info on the client side, there's only one option: not allow XSS by carefully validating scenarios where this may occur (such as displaying poorly sanitized customer data on public pages).

      I guess some people still have some difficulty comprehending that anything in JS is subject to change on the client side.

    15. Re:notabug by achacha · · Score: 1

      So how do I get a job as a "penetration tester"?

    16. Re:notabug by Anonymous Coward · · Score: 2, Insightful

      The thing this paper describes is an attack mounted by a malicious site against later sites in the user's browsing path, not an attack mounted against a site with a flaw. I don't think so. This paper is not saying that a malicious site can change object code and that all future page loads across arbitrary domains will use this code. It's really just saying that through existing vulnerabilities, it's possible to manipulate Javascript code. The only example he gives across domains is one of his "Advanced Examples" where the user has to be using a forward proxy, a browser/plug vulnerable to request splitting/smuggling, AND has to visit a malicious site. This paper isn't really saying anything new, but maybe what makes this a little more scarey today than a few years ago is that a hacker can using XMLHttpRequest as an easy and covert way to receive his payload.

    17. Re:notabug by tomhudson · · Score: 3, Insightful

      I guess some people still have some difficulty comprehending that anything in JS is subject to change on the client side.

      A good example is writing your own proxy to fetch a site, then inject your own scripts into it before feeding it to your browser. Block ads, replace the body.onLoad() that calls a bunch of popups, rewrite all the urls, etc.

      Gee, maybe I should write up a fancy paper on how I did it, say its the "latest attack vector" or some other nonsense, and pimp myself as some 133t s3cur1ty xp3rt.

    18. Re:notabug by Anonymous Coward · · Score: 0

      Note to /.: It's corporate infosec budget time.

    19. Re:notabug by radtea · · Score: 1

      Thanks--from the article it seemed insane that anyone would be the least bit worried about this if it required script injection from the host site, so I was giving the authors the benefit of the doubt (and my ignorance). As it stands it's just a really arcane XSS exploit. Yawn.

      --
      Blasphemy is a human right. Blasphemophobia kills.
    20. Re:notabug by netsharc · · Score: 1
      The author of the paper says things like "innovative new attack" and "next generation of server side injection."

      That's why I feel he's just tooting his own horn. If you can exploit an XSS-hole, you can put anything you want into the webpage, even adding Javascript into a plain scriptless page. E.g. you can add an onclick event handler to every link (or form submit button), which calls a function that in turn fetches an image from a 3rd party server. You can then piggyback data onto that request, as the sniff() function on page 4 of the paper does. No Ajax required!

      The problem isn't the use of Ajax (or XmlHttpRequest) itself is harmful, the problem is XSS-holes are harmful! The XSS holes can come from incompetent browser-programmers or from incompetent webapp-programmers (e.g. if someone made a clone of Slashdot and allowed <script>-tags in the comment box). Luckily there are only a few of the first kind, but unfortunately there are plenty of the latter.

      By the way, "S. Di Paola" is half of the author-team who wrote this paper. So when he says
      This technique has been found by S. Di Paola and is called Prototype Hijacking. It represents the state of the art in hijacking techniques applied to the Javascript language.

      my bullshit-meter went off the charts. "Hijackability", i.e. the ability to modify an object is really a basic feature of Prototype-based languages and there's really nothing state of the art about it.
      --
      What time is it/will be over there? Check with my iPhone app!
    21. Re:notabug by smallpaul · · Score: 1

      The thing which is novel in this paper is the delivery mechanism, specifically by fundamentally replacing parts of javascript to carry attacks in what would otherwise be quite clean and legitimate code.

      But how do you replace parts of javascript in a manner that hurt any site other than the site delivering the bad HTML? How would I replace the prototype of the XMLHttpRequest object transmitted from Amazon.com to you? If the attack depends upon me being between you and Amazon (man in the middle) then there is nothing new, because web applications have always been attackable in this way.

    22. Re:notabug by pboulang · · Score: 2, Funny

      I'll give you $5 if you ask your mom that and follow it up with a "pistol wink"

      --

      This comment is guaranteed*

      *not guaranteed

    23. Re:notabug by julesh · · Score: 1
      The author of the paper says things like "innovative new attack" and "next generation of server side injection."

      Except it isn't "innovative" or "next generation". Everyone involved in javascript client-side programming has known this for years: if you let untrusted JS code execute, it can subvert your page in any way it wants. Hell, he doesn't even touch on the possibilities: it could, for instance, enumerate your functions and rewrite them, changing their behaviour in subtle ways that would be impossible with this technique. This is what happens when you run untrusted code in a dynamic language without sandboxing it so it doesn't have access to your own code. I dare say people working in (e.g.) LISP have known the potential issues with it since the 70s. These vulnerabilities are not new.

      Consider, for example, the following example from the article:


      As a final and better clarifying example of the
      consequences of this attack, let's consider an Ajax
      application developed for bank transfers. This
      application has a web dialog to confirm transactions
      and notifies the user via SMS for every bank transfer
      operation accomplished by an authenticated user.

      If this Ajax interface is exposed to an XSS or to any
      related vulnerability, attacker will just have to inject
      the code and to wait for a bank transfer and then
      use the same code to redirect requests and responses
      to him.


      Or the XSS-injected code could just perform the transaction itself without needing to parasitise the existing app. After all, it's already executing in an execution context that gives it access to everything it would need to do so (otherwise the existing app wouldn't be able to perform such a transaction). This might, at best, make developing such an attack slightly easier: instead of analysing the code of the app to determine how a transfer takes place, you could just sniff a few packets until you see data that looks like it might encode a transfer, then write your new XMLHttpRequest object to change the details. I don't think it's enough easier to warrant the excitement though. In fact, I think it might be harder.

      A Request Splitting attack abuses flaws in
      asyncronous requests and allows to inject arbitrary
      headers when an Http request is built.


      This isn't new either; it's simply the HTTP request smuggling attack method that was widely discussed last summer, initiated by a javascript program. This is simply a browser bug that should be fixed, nothing revolutionary. Certainly no more important than any of the tens of other security-domain-protection failure bugs discovered over the last few years.

      The "auto-injection cross domain scripting" attack is the same thing used to inject a script, an obvious application of the above bug.

      So what we have here is a browser bug that allows a previously-known attack vector to work in a new situation, and a new way of writing attacks which can't achieve anything that previous attacks couldn't do, and which is probably harder to write than the traditional way in most cases.
    24. Re:notabug by dodobh · · Score: 1

      Wrong. TLS secures data transfer, not the code.

      Javascript is in essence, the equivalent of closed source. You can read the code, but there is no guarantee that it is the same code the next time you go to that page.

      With TLS, you are guaranteed to get the authentic exploit.

      --
      I can throw myself at the ground, and miss.
    25. Re:notabug by An+Onerous+Coward · · Score: 1

      > I mean, come on, he even cites someone named "S. Di Paola"...

      That's just one of the many things that bothered me about the paper. The desperate need for proofreading bothered me, the refusal to capitalize properly (Html instead of HTML, Ajax instead of AJAX)... I tried to live with that. But when the authors start citing themselves without giving any indication of the fact, it just makes me feel like somebody is trying to pull a fast one.

      I'm not nearly as impressed by this exploit as you appear to be. My understanding is, it only works for a given browser instance/tab (because each one is running its own JS engine, and different tabs don't share the same object definitions). If my understanding is correct, this vulnerability could be prevented by simply restarting the Javascript engine every time you leave one domain for another (which seems like it ought to be a minor patch for any browser), or by noting any requests made to third-party sites.

      I fail to see how the vulnerability is AJAX-specific, since you could overwrite the alert() and document.write() functions as easily as you could XMLHTTPRequest functions. To that extent, it seems that the authors are simply trying to take advantage of the Web2.0 hype machine.

      I'm no more an expert than the other people weighing in here, so my understanding may be incomplete.

      --

      You want the truthiness? You can't handle the truthiness!

  9. Summary completely overhyped by levell · · Score: 5, Informative

    Having skim read the article, it outlines how *if* you can execute malicious javascript for a website you can subvert the AJAX communication so that you can have man in the middle attacks etc.

    However once an attacker can execute malicious javascript in the scope of the target website you're toast whether you are using AJAX or not.

    I'll make a bold prediction and say that is not going to "kill the Web as we know it" contrary to what the /. article says.

    --
    Struggling to find a day everyone can make? WhenShallWe.com
    1. Re:Summary completely overhyped by Vo0k · · Score: 2, Funny

      1. Prepare malicious javascript code capable of subverting AJAX in the domain it's installed in.
      2. ???
      3. Subvert their AJAX, intercept their communications, change their content, kill the Web as we know it, and ultimately, profit!!!

      --
      Anagram("United States of America") == "Dine out, taste a Mac, fries"
    2. Re:Summary completely overhyped by julesh · · Score: 1

      Having skim read the article, it outlines how *if* you can execute malicious javascript for a website you can subvert the AJAX communication so that you can have man in the middle attacks etc.

      However once an attacker can execute malicious javascript in the scope of the target website you're toast whether you are using AJAX or not.


      Exactly. All competent web developers are aware that if javascript from a remote system can execute in the context of your page, you have no control over what it can do. Usually the answer is to "not do that". You rely on the browser's domain-based protection system to prevent other open pages injecting code into your page. You quote any user-supplied data to prevent XSS attacks. You don't have <script src="somewhere"> tags unless you trust "somewhere". And above all you don't exec() untrusted data. This is basic security practice, and applies to all languages, not just javascript: don't execute code that you don't trust in a context that gives it access to data you want to protect.

  10. FUD? by ArcherB · · Score: 1

    a possible Web Worm that lives in the very fabric of Web 2.0 and could kill the Web as we know it.

    This statement has FUD written all over it. (or was it written in FUD?)

    --
    There is no "I disagree" mod for a reason. Flamebait, Troll, and Overrated are not substitutes.
    1. Re:FUD? by ednopantz · · Score: 4, Funny

      >(or was it written in FUD?)

      Ok, I propose we create a new programming language called FUD. Variables will be assumed to have their most sinister values and be impossible to verify.

    2. Re:FUD? by monoqlith · · Score: 4, Funny

      . (or was it written in FUD?)

      Sadly, no. The FUD compiler was written in Javascript, and was hijacked.

    3. Re:FUD? by Mr.+Underbridge · · Score: 2, Funny

      Ok, I propose we create a new programming language called FUD. Variables will be assumed to have their most sinister values and be impossible to verify.

      Is that language derived from brainfuck?

    4. Re:FUD? by kirun · · Score: 1

      Why bother? I hear Microsoft are releasing their version in six months.

      --
      I'm scared of numbers that can't be written as a fraction. It's an irrational fear.
    5. Re:FUD? by wasted · · Score: 1
      ...a possible Web Worm that lives in the very fabric of Web 2.0 and could kill the Web as we know it.

      This statement has FUD written all over it. (or was it written in FUD?)

      I was hoping that it wasn't totally FUD, and the result would be that the term Web 2.0 would be killed. Guess my luck isn't that good.
    6. Re:FUD? by alphamugwump · · Score: 1

      Naw, this is more like brainfuck 2.0. It has built-in support for multithreading, OOP, and types. Dynamic types, at that.

    7. Re:FUD? by hobo+sapiens · · Score: 1

      oh, you didn't see the author's name?

      wait for it...



      Elmer Fudd? There... FUD, written by FUDD, and written in FUD. Ok, I'm gonna get some food.

      --
      blah blah blah
  11. Horeshit.....javascript is crap but....horeshit by MajorDick · · Score: 2, Informative

    I hate JS, it Had potential, 8-9 years ago. What we are seeing now is a push way beyond its original intended scope. The truth is, it would have had much less potential for vunerability if it had not been neglected for so long. Every time I have to get down and dirty with it I think of that. Its Ok, and somethings are nice from a shorthand perspective if youre used to other lll, but for GODS Sake , Revise the spec and put some effort into it, OH Wait, but thats been part of the problem all along, MS puts this in, NS/Moz (Used to) and what do we have , something no one entity controls, or even standards of. Whats wrong with putting a friggin python interpreter in a browser ? Ms is running that way with IronPython (Yea Proof of concept I know) but Read Scott G, and Paul W. aticles on dynamic languages theyre a fan. Oh well, back to ajaxifying the planet because my boss dosent like the flash when he clicks buttons on the web ( Oh wait I quit that job 4 months ago....)

    1. Re:Horeshit.....javascript is crap but....horeshit by cnettel · · Score: 4, Insightful

      Python also allows on-the-fly redefinitions, which is blamed here. Generally, the choice of scripting language is not the problem here. Most "Javascript" bugs translate directly into VBScript if you're IE-masochistic (or Perlscript, if you've managed to install that and trick IE into running the engine for it). The problem is in the DOM, what objects might theoretically be exposed, and how it's crucial that some part of the browser can access them, while others should not. After all, in Mozilla, the whole UI is held together by Javascript, running in basically the same engine, but a different sandbox. The situation with the IE scripting environment is quite comparable.

    2. Re:Horeshit.....javascript is crap but....horeshit by FLEB · · Score: 2, Insightful

      The problem is that any other interactivity solution has to be universally applied, and right now there's a universal solution that's adequate, more adequate than instituting a ground-up rebuild, so anything in the future is going to be tacked-on to that. I suppose the best we can hope for is incremental, inside-to-out cleanup of the language, and, like CSS and "quirks modes" do, old code that breaks is switched to a legacy mode. Still, though, I think it's going to stay JavaScript, at least for the forseeable future. There's just too much inertia.

      My problem? I wish some other name than "JavaScript" had come around, so every JS book and every JS idiot didn't need the paragraph about "Javascript is nothing related to Java".

      --
      Information wants to be free.
      Entertainment wants to be paid.
      You just want to be cheap.
    3. Re:Horeshit.....javascript is crap but....horeshit by smittyoneeach · · Score: 5, Insightful
      What we are seeing now is a push way beyond its original intended scope.

      Name a Turing-complete programming tool which has not seen this.

      I throw in the qualifier because, other than stuff like regular expressions and SQL, which are not Turing-complete and have blissfully narrow scopes, everything else has seen javascript-acular scope creep.

      Here, have an httpd written in PostScript: http://public.planetmirror.com/pub/pshttpd/

      Perhaps not being Turing-complete is a left-handed virtue.
      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    4. Re:Horeshit.....javascript is crap but....horeshit by kirun · · Score: 2, Interesting
      "Javascript is nothing related to Java".
      It didn't use to be (apart from both of them having C-related syntax and Interweb-related hype), but it is now if you're using Firefox. For example, the following works:

      <script> document.write(new java.lang.String("I'm here")); </script>
      They're no fun though, they left out stuff like java.io
      --
      I'm scared of numbers that can't be written as a fraction. It's an irrational fear.
    5. Re:Horeshit.....javascript is crap but....horeshit by Anonymous Coward · · Score: 0
      "Javascript is nothing related to Java".

      It didn't use to be (apart from both of them having C-related syntax and Interweb-related hype), but it is now if you're using Firefox. For example, the following works:

      <script> document.write(new java.lang.String("I'm here")); </script>

      That's not new in Firefox, it's been around since old Netscapes (possibly even the first version that had both Java and JavaScript). I suspect that's why it's called JavaScript in the first place.

      They're no fun though, they left out stuff like java.io

      It's there, you just can't use it from a non-privileged context.
    6. Re:Horeshit.....javascript is crap but....horeshit by Anonymous Coward · · Score: 0

      ECMAScript

    7. Re:Horeshit.....javascript is crap but....horeshit by hobo+sapiens · · Score: 1

      You could (and many do) make the argument that HTML is in the same boat. Yes it *works*. Does it provide a perfect environment for creating the complex, interactive web apps that we use it for? Heck no! Does anyone with any real power actually enforce standards? W3 who? And yet, in spite of its ugliness it works. It's a bit like wikipedia, in theory it sucks but in practice it works great.

      If anything, I think it's a testament to the web development community that something so huge and robust can be hacked together with totally inadequate tools. It's like someone building a car with nothing more than a ball-peen hammer and a dull hacksaw.

      --
      blah blah blah
    8. Re:Horeshit.....javascript is crap but....horeshit by truedfx · · Score: 1
      I throw in the qualifier because, other than stuff like regular expressions and SQL, which are not Turing-complete and have blissfully narrow scopes, everything else has seen javascript-acular scope creep.
      Extended regular expressions have been used as tests for prime numbers. I'd say that counts as beyond the original intended scope.
    9. Re:Horeshit.....javascript is crap but....horeshit by MajorDick · · Score: 1

      I cannot disagree. BUT it dosent mean its the right choice or even a good choice.
      I am an extremley adept programmer. I have been coding since I was 7 (in 1977) I started with Fortran (Yes 77 :)
      I could, code web pages, or whatever in assy if I wanted .
      When .Net was announced and the first CLR specs were released for "ratification" I started (just for shits and grins) to code in CLR Assembler it was a challange and something I have yet to find one of my contemperaries can do. well.....its proved valuable for decompilation and editing of obfucticated libraries, and I have even as a stunt created .net web pages in it for the junior programmers that claim nooone could write in it directly. BUT its not a great use needless to say.

      Learing CLR Assy was one of the last things I learned or did "Just because I could" , I feel that way about JS now. I can , and I do, it dosent mean I want to or feel its even remotley the correct choice, for client side it is unfortunatley the ONLY choice for a broad audience....

    10. Re:Horeshit.....javascript is crap but....horeshit by Millenniumman · · Score: 2, Interesting

      I could, code web pages, or whatever in assy if I wanted . What web browser are you using that has a built in assembler?
      --
      Stupidity is like nuclear power, it can be used for good or evil. And you don't want to get any on you.
    11. Re:Horeshit.....javascript is crap but....horeshit by pestilence669 · · Score: 3, Insightful

      JavaScript has gotten a pretty bad rap. I think unfairly. People tend to pigeonhole it as a "web" scripting language, which is certainly how it started off, but it's much more capable than that. Even Java started off as a "Web" language (with ambitions of world domination). Both have matured in the past decade.

      JavaScript has all the niceties of modern OO languages and more, because it's prototype-based. All that's needed is some discipline, because it also allows you to write exceptionally ugly code. Both Perl and C++ are the same way. You can drop into procedural hell any time you like. In C++, you can even resort to goto statements or drop into assembler.

      In JavaScript: you can have static class methods & members, encapsulation (private methods & such), multiple layers of abstraction, and features even Java can't handle, like: multiple inheritance, closures, reflection, and dynamic typing. Not to shabby for a crappy little scripting language.

      Any nice OO language (like Python, Smalltalk, Ruby) in a browser sounds wonderful... but it'll never work for very long. Do you really think that Microsoft could keep proprietary language tweaks out of their implementations? It happens with JavaScript all of the time. Netscape added proprietary features because it was THEIR language. AFAIK, that stopped as soon as it was offered up for standardization.

      Microsoft has continued to make proprietary "contributions" to JavaScript. If it weren't for them, everybody's JS implementations would work together in harmony. Microsoft alters their HTML, XML, CSS, and C++ implementations in ways that prohibit cross-platform compatibility (what a surprise). They'll do the same to Python.

    12. Re:Horeshit.....javascript is crap but....horeshit by WillerZ · · Score: 1

      SQL is now used to select messages for delivery in JMS, which it wasn't designed for. It's difficult to do efficiently in that situation, and thus no-one has yet.

      --
      I guess today is a passable day to die.
    13. Re:Horeshit.....javascript is crap but....horeshit by Omnifarious · · Score: 1

      It sounds like the Javascript interpreter needs to be completely restarted from scratch with every new page that's loaded. Otherwise, if you can stick your method into the Javascript base classes, how would you remove it when a new page is loaded?

    14. Re:Horeshit.....javascript is crap but....horeshit by Omnifarious · · Score: 1

      You would almost certainly have problems in Python too, but I think there are many methods in Python that can't really be redefined in this manner because the binding is immutable. But it doesn't really matter how many there are, as long as there's one that other programs would use with some frequency.

      What's needed is a full interpreter reset and load from scratch with every new page.

    15. Re:Horeshit.....javascript is crap but....horeshit by arevos · · Score: 1

      very time I have to get down and dirty with it I think of that. Its Ok, and somethings are nice from a shorthand perspective if youre used to other lll, but for GODS Sake , Revise the spec and put some effort into it,

      Are you complaining about the language itself, or the libraries?

    16. Re:Horeshit.....javascript is crap but....horeshit by Myen · · Score: 1

      Hmm, can you tell me how to implement multiple inheritance? I've wondered about that... And yes, I do want to keep instanceof working, so just copying the properties/methods over, or even calling the base constructor in the derived constructor, will not work :(

      Also, Netscape (now Mozilla) does still keep evolving the language. For example, JS1.7 (Firefox 2 / Mozilla 1.8.1 branch and later). And there's work on ECMA262 ed 4. (Mostly seems to be Mozilla and Adobe folks behind it).

    17. Re:Horeshit.....javascript is crap but....horeshit by bunions · · Score: 1
      Whats wrong with putting a friggin python interpreter in a browser ?

      Because it's whitespace sensitive and HTML isn't. It's a recipe for disaster.

      Also, you're an idiot who wouldn't know a great language if it bit you on the ass. All the downsides of Javascript are in the interface with HTML, and that's not going to change if you replace it with python, ruby or whatever the hiip 'n' trendy language is this week.
      --
      there is no need to sign your posts. this isn't usenet. your username is right there above your post. stop it.
    18. Re:Horeshit.....javascript is crap but....horeshit by arunkv · · Score: 1
      Javascript is nothing related to Java

      It didn't use to be (apart from both of them having C-related syntax and Interweb-related hype), but it is now if you're using Firefox. For example, the following works:

      <script> document.write(new java.lang.String("I'm here")); </script>

      Don't forget Netscape LiveConnect which allowed Javascript to invoke Java code way back in the 90s.

    19. Re:Horeshit.....javascript is crap but....horeshit by marcosdumay · · Score: 1

      "All that's needed is some discipline, because it also allows you to write exceptionally ugly code. Both Perl and C++ are the same way."

      And guess why people are avoiding C++ nowadays, and Perl is still considered a hakers language. The only good thing about Java is that it is hard to write ugly code. Really, it shines in no other way, code is much biger than it could be, stantard library is full of (backward compatible) bugs and hacks that will be bugs on next versions, it is slow, it is hard to acess the plataform features... No single quality, but being hard to write ugly code.

      And once you work on a system wrote by a dozen different developers, you'll understand why that is so important.

    20. Re:Horeshit.....javascript is crap but....horeshit by bunions · · Score: 1

      > I cannot disagree. BUT it dosent mean its the right choice or even a good choice.

      So far all we have from you is assertions:

      - javascript is shit
      - python would be better

      Care to back any of them up with some logical arguments?

      ps: no one cares about what you claim you've done in what language and why.

      --
      there is no need to sign your posts. this isn't usenet. your username is right there above your post. stop it.
  12. Crying "Wolf" by flajann · · Score: 3, Interesting

    Do they ever learn? All of this scaremongering is numbing the uninitiated, and when there is a real threat no one will be prepared.

    Well, my BS meter pings off the scale when I see alarmist claims like "shutting down the web." How many of those claims have we all seen over the past years?

    I suppose it's the 21st-century equivalent of "The World is Comming to an End!"

    I consider that anyone who makes such outlandish claims should be remembered, indexed, marked, and noted. When their claims fails to come true, then we can all stand around and laugh at them and grant them Idiot Awards.

    1. Re:Crying "Wolf" by Aladrin · · Score: 1

      What makes you think this has not already happened? Botnets. They are a very real problem right now, and the public, in general, just ignores the problem. Only techies even care a little about botnets, and we generally are not infested with them. To the common Joe, it's just a buzzword and yet another virus. (Joe doesn't know the difference, and calls them all viruses.)

      --
      "If you make people think they're thinking, they'll love you; But if you really make them think, they'll hate you." - DM
  13. On the next episode of Days of Our Web2.0 Lives... by Chineseyes · · Score: 5, Funny

    A Worm that lives in the very fabric of Web 2.0 and could kill the Web as we know it lurks is the deep dark recesses of the javascript
    Who is this masked man known as the worm?
    Why does he hate Web 2.0 so much?
    Will this worm try to make us revert to Web 1.0?
    And does this worm have anything to do with disappearances of Web 1.1 through Web 1.9?
    This and much much more on the next epside of Days of our Web 2.0 Lives

    --
    I think the invisible hand of the market has its middle finger extended

    --A wise old fart named SC0RN
  14. AJAX != the web by Anonymous+Brave+Guy · · Score: 3, Insightful

    The paper is called 'Subverting AJAX' (pdf), and outlines a possible Web Worm that lives in the very fabric of Web 2.0 and could kill the Web as we know it.

    Well, considering that AJAX is used on only a tiny proportion of web sites, and often not to particularly good effect, I'd say that's a bit of a silly claim. In any case, AJAX often suffers from the same flaws as pseudo-web technologies like Flash before it: lack of bookmarkability, breaking back buttons, etc. These are far more likely to doom it than any random security flaw.

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    1. Re:AJAX != the web by i23098 · · Score: 1

      Well, considering that AJAX is used on only a tiny proportion of web sites, and often not to particularly good effect, I'd say that's a bit of a silly claim. In any case, AJAX often suffers from the same flaws as pseudo-web technologies like Flash before it: lack of bookmarkability, breaking back buttons, etc. These are far more likely to doom it than any random security flaw.

      Thankfully, someone already though of it... More than a year ago, at least, in here

      Sure, there should be a standard way to do it, but it's not impossible :p

    2. Re:AJAX != the web by Anonymous Coward · · Score: 0

      It doesn't matter whether a site uses AJAX or not. If you can inject script into a page using XSS, then anything on the page or entered into the page can be forwarded on to anther domain, using the document.write('') technique. Using AJAX on a web site does not create new XSS vulnerabilities, so it doesn't increase the risk from XSS.

    3. Re:AJAX != the web by Anonymous Coward · · Score: 0

      Thanks for some additional FUD. Flash supports bookmarking and has for years. Just because people don't know how to do it doesn't mean it can't be done. In fact, there are sections of the old Macromedia site that are in flash but support bookmarking, text selection, and the usual browser right-click functions. I have seen people argue with the Macromedia.com architect that it can't be flash because it supports those functions.

      Still, anyone who claims that AJAX secrurity flaws are the end of "web 2.0" don't really know much about "web 2.0" since it's not just AJAX. It's probably the same people who say that AJAX is new and POJO is new and Vista is freaking cool.

    4. Re:AJAX != the web by Anonymous+Brave+Guy · · Score: 1

      Thanks for some additional FUD. Flash supports bookmarking and has for years. Just because people don't know how to do it doesn't mean it can't be done.

      You can support this sort of thing with AJAX if you're clever enough, too. But the point is, most people don't, which means it isn't worth very much right now.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  15. 100% FUD by suv4x4 · · Score: 1, Insightful

    You can detect it even from the summary: "a Web Worm that lives in the very fabric of Web 2.0 and could kill the Web as we know it."

    Even if JS suddenly stopped working outright today, web wouldn't change a whole lot, from what we know it.

    Apparently the guy just comes from compiled languages like C++ where you can't modify a class once its defined, and he decided to spread some FUD to express his disgust with dynamic languages.

    I guess he was disappointed he can't safely store his server root passwords in his JS files.

    1. Re:100% FUD by TerranFury · · Score: 1

      >I guess he was disappointed he can't safely store his server root passwords in his JS files.

      I hope that, before that, he didn't think he could safely store his passwords in EXEs too...

    2. Re:100% FUD by Anonymous Coward · · Score: 2, Insightful
      You can detect it even from the summary: "a Web Worm that lives in the very fabric of Web 2.0 and could kill the Web as we know it."

      Even if JS suddenly stopped working outright today, web wouldn't change a whole lot, from what we know it.

      Apparently the guy just comes from compiled languages like C++ where you can't modify a class once its defined, and he decided to spread some FUD to express his disgust with dynamic languages.

      I guess he was disappointed he can't safely store his server root passwords in his JS files.
      Wow. Just wow. You crucify the guy without even reading the paper itself. First of all, that phrase doesn't come from any of the links - it comes from the submitter. You don't even know the guy and yet you launch a personal attack on him (moderated +5 insightful for some reason).

      For your information, just skip to the last page of the paper. It describes both of the paper's authors. Probably the main author of the paper is Stefano Di Paola and his brief biography is given in the paper, you don't even need to look it up. He's a professor at the University of Florence and has found many dangerous vulnerabilities in MySQL and PHP. It also looks like a fairly well researched paper (didn't read all of it though). Obviously, you'd have to verify his bio to be 100% certain that it is true, but I have a feeling it is if he's a respected security expert (which would explain him presenting at 23C3).

      You may also find this nice little gem as the last paragraph:
      As it seems, Web 2.0 applications will be more and
      more tightly tied to browser security, that is
      increasing in complexity and has to take care of a
      plethora of features that can be turned into weapons
      if controlled by a malicious attacker.
      Certainly, non of the end of the world scaremongering you attributed to himself. Somehow, I have a feeling that this guy knows more about this stuff than you.
  16. A fallacy repeats a thousand times, like a truth. by eat+worms · · Score: 1

    The same thing shows up again and again. Air has pollutions, none wants to stop breathing.

  17. Already been done by Anonymous Coward · · Score: 1, Funny
    Ok, I propose we create a new programming language called FUD. Variables will be assumed to have their most sinister values and be impossible to verify.

    Check out these great functions from the std lib:

    halloweenDocuments();
    GetTheFacts();
    fundSCO();
      threatenToSueEasternGovernments();
    hoodwinkNovel l();
    ...who says Microsoft don't innovate?
    1. Re:Already been done by ednopantz · · Score: 1

      Nah, FUD is inherently cross-platform.

    2. Re:Already been done by YU+Nicks+NE+Way · · Score: 1

      Wow! That was fast -- there's already an open source cross platform implementation of Microsoft FUD, and the language was only invented a few minutes ago!

  18. The end of the web... by KindredHyperion · · Score: 1

    Goodbye, friends. It seems that this is, truly, the end of the internet. *sniff*

    _

    --
    For whose sake, henceforth, may his vowes be such As what he loves may never like too much.
  19. solutions by fyoder · · Score: 2, Informative
    • server side: never trust user data.
    • client side: You're hosed. But if you're smart you already regard yourself as hosed. There have been security bugs where a maliciously crafted image could get you. Before going to shady sites you turn off java, javascript, and you would never even visit a shady site with IE. Turning off javascript might make a 'Web 2.0' site unusable, but it's a question of trust.

    If 'Web 2.0' comes to be widely untrusted, it will have to change or die. This doesn't represent any new threat to the web itself. The threats are old and because of their nature have been there from the beginning and aren't going away any time soon.

    --
    Loose lips lose spit.
    1. Re:solutions by kabz · · Score: 1

      What? Like a picture of your ex-wife?

      --
      -- "It's not stalking if you're married!" My Wife.
  20. Circumventing the XSS protection of AJAX by KalvinB · · Score: 3, Insightful

    JavaScript S on Domain A needs to access the server side script on Domain B. All S has to do is AJAX to a local bridging script which forwards the request using CURL,LWP, etc to B. The bridge then feeds the response to S. S has no idea that the AJAX request went to another domain. As far as B knows, A is just a web visitor.

    Since AJAX runs on the client side it's not possible to whitelist IPs and Referers can be spoofed.

    As with every client/server app the client can never be trusted.

    1. Re:Circumventing the XSS protection of AJAX by tomhudson · · Score: 1

      In other words, if your javascript calls anything that proxies a resource, normal per-domain restrictions don't apply.

      This isn't even XSS. Its just how it works ...

      Wake me up when there's some REAL news :-)

    2. Re:Circumventing the XSS protection of AJAX by smallpaul · · Score: 1

      JavaScript S on Domain A needs to access the server side script on Domain B. All S has to do is AJAX to a local bridging script which forwards the request using CURL,LWP, etc to B. The bridge then feeds the response to S. S has no idea that the AJAX request went to another domain.

      What you said is illogical. You start out saying that S from Domain A wants access to the script on Domain B. Then you conclude by saying that "S has no idea that its request went to domain B." So that's what S wanted, but somehow it is a surprise? Please give a concrete example.

      As far as B knows, A is just a web visitor.

      A _is_ just a web visitor. A can only authenticate on B if it is given a password or other authentication token. And the user controlling S would have to willingly give it that token, perhaps because A offers a service that requires access to B. It isn't a bug. It's a feature.

      Since AJAX runs on the client side it's not possible to whitelist IPs and Referers can be spoofed.

      What??? AJAX in no way interferes with whitelisting IPs.

      As with every client/server app the client can never be trusted.

      From the server's point of view, the client can only be trusted to do the will of the customer who (presumably) controls it. From the client's point of view, the server can be trusted to do the will of the administrator who (presumably) controls it. This "client cannot be trusted" mantra is an oversimplificaiton. If it were truly impossible to secure a client machine then passwords would be irrelevant and e-commerce impossible, because they would all be vulnerable to client-hacks. But I do send my passwords and credit card over the Internet with reasonable confidence (over SSL) because *I* am confident that my client machine has not been hacked and have a reasonable amount of trust in the security of the organizations I do business with. The client is untrustworth from Amazon's point of view because it works on my behalf or the behalf of whoever has hacked machine, not on Amazon's behalf.

      That IN NO WAY implies that the security of the client machine is unimportant. Amazon needs its customers to have confidence that their client machines work on their own behalf and not that of a random hacker. If this paper highlighted a way to truly compromise client security then it would be a serious issue. But I don't believe it says anything new or interesting at all.

  21. Why Ajax needs to move beyond JavaScript by Twillerror · · Score: 1

    One of the biggest issues I have with Ajax and really what the web browser has turned into is Javascript.

    Don't get me wrong, I think the language is "alright". The problem is it is the only choice out there.

    There are many flavors of Linux and pratically everytype of appliation out there. But only one real choice for scripting on a web page.

    Ajax's primary function is the ability to grab content from a web server ( or any server ) and then modify DOM of the web page you are working on.

    The could be done by any programming language. Most of the time I use Ajax I just grab some HTML content and blast it into a div or some other object. Here Jscript isn't that big of a deal with a good library.

    When I start to have to actually grab the value and parse it that is where JScript is the only option. I wish that browser would stat offering some choice. Maybe Ruby or Python or Perl, don't really care. Just something else besides JScript. Seems like ActionScript might get a chance.

    1. Re:Why Ajax needs to move beyond JavaScript by belg4mit · · Score: 1

      First, Jscript ne JavaScript
      Second, if you're unlucky enough to be using IE you do have alternatives: VBScript and,
      if you have installed ActiveState, PerlScript (not that I recommend enabling a browser
      with such power). I also seem to recall a Tcl plug-in back in the day.

      Nevertheless, JavaScript is the de fact standard and so everybody uses it, to minimize
      the potential for "foo only" websites.

      --
      Were that I say, pancakes?
    2. Re:Why Ajax needs to move beyond JavaScript by 75th+Trombone · · Score: 1

      What's keeping you from parsing it on the server-side before it sends anything back to the browser?

      --
      The United States of America: We do what we must because we can.
    3. Re:Why Ajax needs to move beyond JavaScript by Anonymous Coward · · Score: 0
      When I start to have to actually grab the value and parse it that is where JScript is the only option. I wish that browser would stat offering some choice. Maybe Ruby or Python or Perl, don't really care. Just something else besides JScript. Seems like ActionScript might get a chance.

      And yet you don't seem to mind the fact that you are only allowed to send web pages in HTML. You gotta have standards, and it turns out that HTML is not too bad of one. Likewise, Javascript is ubiquitous and not too bad. I think you'd be better off treating Javascript as a ubiquitous backend (like ASP, PHP, wiki-formatting, etc. do for HTML) than to ask the client to support language-of-the-month. You can get Java-to-Javascript compilers already; other languages can't be too far behind.
  22. What kind of worm? by Anonymous Coward · · Score: 0

    Worm? What kind of worm? Is it like a heartworm? Cause I can just give my PC a pill once a month. Except I don't want to pay for pills. So I'll just use Necco wafers.

    See, I'm safe!

  23. Ajax IS considered harmful. by Vo0k · · Score: 3, Insightful

    Ajax sucks. Not because of security.

    The article Why Ajax Sucks (Most of the Time) is a nice spoof of an old article about frames. Despite being a spoof, the word 'frames' replaced by 'ajax' and little else changed, it's surprisingly accurate and nicely outlines WHY it's harmful.

    --
    Anagram("United States of America") == "Dine out, taste a Mac, fries"
    1. Re:Ajax IS considered harmful. by arevos · · Score: 1

      Ajax sucks. Not because of security.

      This sounds as if you believe there is no benefit to AJAX whatsoever. Perhaps you should have put a qualifier on the front, like "Most AJAX sucks"?

  24. Non-PDF? by NineNine · · Score: 1

    Anyone know where I can find a non-PDF version of this paper?

    1. Re:Non-PDF? by NineNine · · Score: 1

      Very useful link, thanks.

  25. A matter of scope by Tablizer · · Score: 1

    AJAX would perhaps be better for inTRAnet than internet where hacking is less likely. At least it is not any more vulnerable than existing desktop apps (VB, Delphi, Powerbuilder, etc.) where the hacker can do anything to the EXE. Internal biz forms can probably make more use of AJAX than public internet stuff anyhow.

  26. A well-travelled road by ishmalius · · Score: 1
    Heh. I love the 'notabug' tracker tag. Dismisses the submitter politely.

    But, yes, there is nothing new in AJAX that causes security problems. It is not new tech, just a style of architecture. The same problems and solutions with respect to security exists for AJAX as for the underlying infrastructure. Java applets, Flash apps, "traditional" Javascripted pages, all have had their trials and tribulations in the past, and their security models are well mapped-out. The sandboxes already exist. AJAX runs within them, not outside.

    1. Re:A well-travelled road by hobo+sapiens · · Score: 1

      Yes, and just because bad development techniques can cause security holes, we blame the technology. This is a bit like PHP being called insecure. Any language/platform/technique is insecure if the programmers leave gaping holes.

      --
      blah blah blah
  27. Have you ever tried to deploy an AJAX application? by Anonymous Coward · · Score: 5, Informative

    I haven't read it either, but from experience, I'd imagine it hold up very well.

    AJAX applications just aren't solid or stable, for the most part. We tried to integrate a number of them into our network here, and frankly each attempt went terribly. I'd like to think it was just one application vendor or AJAX toolkit that was problematic, but that wasn't the case.

    We found a number of common problems with every AJAX application we tried. Just for the record, the applications included three CMS systems, a Web-based email system, two groupware systems, and three Web forums.

    The first major problem with one of resource usage, on both the client-side and the server-side. Client-side, many AJAX applications consume far too much CPU time. From our investigation, it was due to the use of poor JavaScript algorithms that'd consume 100% of the CPU in some cases, for minutes on end. The applications "worked", in that they'd provide the correct result. It'd just take them far too long to get it done.

    On the server-side, they'd again result in excessive CPU and RAM consumption. For one of the Webmail systems, we could only handle a fifth (yes, 20%) of what our old Perl-based system could. And that was on a quad-core Opteron system with 8 GB of RAM! The Perl-based system was on a couple of 200 MHz Pentium systems, each with 128 MB of RAM. Even after assistance from the AJAX-based Webmail system's vendor, we were only able to handle roughly 90% of the number of transactions of our older system.

    The second major problem is that of usability. Many of the AJAX apps we tried didn't play well with browser tabs, for instance. Some even fucked around with text input areas, resulting in copy-and-pasting no longer working. One application even prevented the text within a text field from being highlighted! We thought these problems may be browser-specific incompatibilities, be we ran into this same problem with Firefox, Safari, Opera, and even IE6! After talking with the vendor, they admitted these were known problems, and no solutions were presently available.

    The third major problem is a lack of quality. Many AJAX applications are poorly coded and poorly designed. I think the main reason for that is because it's such an unstructured technology. Even competent software developers run into problems that cannot be solved easily, and thus must resort to hackish techniques to overcome these inherent problems.

    The fourth major problem was that the users hated the systems. Of the few systems we managed to roll out successfully, the users absolutely hated them. Their complaints were a combination of the above three factors. The AJAX applications would not do what the user wanted. The AJAX applications did not conform to common practices (eg. copy-and-paste, textbox text selection, etc.). The AJAX applications ran far too slowly, even on fast client machines. The AJAX applications just plain didn't work!

    All of our AJAX trials were abysmal failures. That's why we're sticking with the existing Perl- and Java-based systems that we currently use. They perform far better on much fewer resources, actually do what the users want, avoid violating the most common of conventions, and they do what they're supposed to. I'm sorry to say it, but AJAX might just be the worst technology I have ever had to deal with.

  28. Ajax Can Be Harmful! by Your+Pal+Dave · · Score: 1
    According to the label:
    Eye irritant. In case of eye contact, flush with water. To avoid harmful fumes, do not mix with ammonia or other cleaning products. Keep out of reach of children.


    I don't think Comet is any better.
  29. Retards by Anonymous Coward · · Score: 0
    the formal standard in Web 2.0 application development

    LMAO
  30. C/C++ by cyfer2000 · · Score: 1

    When vulnerabilities of C/C++ stop people from using C/C++, this may happen.

    --
    There is a spark in every single flame bait point.
  31. A Dispatch from the insititute of Duh! by Anonymous Coward · · Score: 0

    To summarize, if you can get people to come to your website you can make the browser do what you want. Also some plug in have bugs. If you install a plug in it can do thing that are bad.

    All you need to know.

    Don't add javascript from another site and expect your app to be secure.

    Javascript can make a man in the middle attack more effective.

    The point is NONE of the vunerablity is in the javascript or the browser.

  32. Re:Have you ever tried to deploy an AJAX applicati by jackharrer · · Score: 1

    I have all those problems with changepoint. It's supposed to make our life easier but it's a huge nightmare. It's slow - on my dual core centrino and 2GB RAM it crawls. On 12MB internet link. Plus because somebody forgot to update a code it doesn't work with IE7 (which I use it for testing and sucks) AND Firefox.
    Same is with for example yahoo mail. All my friends who used the 'new improved' one, reverted to old one. Too slow and annoying.
    There's more examples like that. When finally vendors understand that people want working fast software not beautiful, shiny piece of not working crap?

    Just my 2p.

    --

    "an experienced, industrious, ambitious, and often, quite often, picturesque liar" - Mark Twain
  33. Re:Have you ever tried to deploy an AJAX applicati by udderly · · Score: 1

    Sorry, I still don't think that it will "kill the Web as we know it." That's sensationalist, fear-mongering BS.

  34. Seriously, can we mod the OP Flamebait? by Trails · · Score: 4, Informative

    As well as the dingbat mod who let this crap summary get on /. unedited?

    I hate all this crap about "ZOMG, once I can inject javascript into a page, something else makes it totally insecure!!!"

    Once someone can inject javascript onto a page, you're toast. The article itself is valid, and isn't complaining about ajax so much as prototyping (despite the title of the paper).

    1. Re:Seriously, can we mod the OP Flamebait? by grayNOISEeffect · · Score: 1

      Ok, this article/summary has been officially ripped apart.

  35. FUD by hobo+sapiens · · Score: 1

    AJAX is a great technology. Yes, if you overuse it or use it in the wrong places then it is harmful. Saying AJAX is unstable, unusable, brittle, impractical is simply an untrue generalization. Like anything else, if you do it right it enhances usability and is quite reliable.

    --
    blah blah blah
    1. Re:FUD by jlarocco · · Score: 2, Insightful
      AJAX is a great technology. Yes, if you overuse it or use it in the wrong places then it is harmful. Saying AJAX is unstable, unusable, brittle, impractical is simply an untrue generalization. Like anything else, if you do it right it enhances usability and is quite reliable.

      I'm sorry, but I have to disagree. AJAX is NOT a great technology. It's a perversion. It bends HTTP and HTML to do things they were never meant to do. And because of that, it's not really surprising that it has so many huge problems. Not being able to bookmark or use the back button? Those are gigantic problems.

      If anything good can be said about AJAX, it's a curiosity. It's certainly amusing that it can be done, but "great technology" it is not.

    2. Re:FUD by bunions · · Score: 4, Interesting

      those 'gigantic problems' aren't problems with Ajax. There exist good solutions for both. The solutions, however, are nontrivial and are typically ignored by developers for whatever reasons.

      --
      there is no need to sign your posts. this isn't usenet. your username is right there above your post. stop it.
    3. Re:FUD by gomoX · · Score: 2, Interesting

      That's just stupid. A well designed AJAX app is faster to use than a regular one. Page reloads suck for applications. Have you seen Google Mail, with embedded Talk client, or maybe Calendar, or even the DHTML beta of slashdot's comments (barely AJAX, but still)? Those kick ass compared to older versions. A well designed AJAX app is great. Most AJAX apps suck, but it's not AJAX fault. And yes, it's sort of a hack. So what? So is every standards compliant site that looks good.

      --
      My english is sow-sow. Sowhat?
    4. Re:FUD by Anonymous Coward · · Score: 2, Insightful

      Speed is not the only criteria one uses to judge a Web application. For many people, being able to bookmark a page is very important. When it comes to sites using AJAX, such bookmarks are often not possible.

      People also find it important to be able to open multiple pages of a site in multiple browser tabs concurrently. AJAX sites often do not allow for this, or run into problems if it is attempted.

      It's also important that an AJAX site not cause a browser to repeatedly send out requests to the point of the CPU being maxed out, and the web browser becoming unusable.

      There is a lot of talk about "well-designed AJAX applications", but we never actually end up seeing such a beast. You talk of GMail. I use the non-AJAX GMail interface mainly because the AJAX interface does not allow me to open emails in new tabs.

      When it is very difficult, if not outright impossible, for virtually all developers to come up with even just a decent application using a specific technology, I do blame the technology. It obviously impedes the ability of even the best developers, presenting problems that cannot be avoided or worked around.

      AJAX is to web development what a cucumber would be to the guy who nails in railroad spikes. It's fucking useless. The railroad builder will smash cucumber after cucumber on the railroad spike trying to nail it down, without any usable results in the end. The same goes for web development using AJAX.

    5. Re:FUD by tacocat · · Score: 1

      AJAX can be considered a great technology because it's the only thing that provides a ubiquitous framework for asynchronous information transfer. It's a uber-shitty implimentation because Javascript was never intended to do anything like this. But the concept is cool. The implimentation is not.

      Back up about a decade and everyone in the world was writing Java Applets. These permitted the same end goal of asynchronous data communication. But Java is a cpu/memory hog and would frequently blow up machines. Therefore everyone came to conclusion that Java Applets pretty much sucked and you rarely see them.

      Javascript could be the right tool for what AJAX is demonstrating. But it's going to have to be completely rethought on how Javascript works with the client/server.

      Not having RTFA, wouldn't you be able to use HTTPS?

    6. Re:FUD by matrixhax0r · · Score: 2, Insightful

      Bookmarking has been subverted way before AJAX came along. Any website generated from POST information can't really be bookmarked. That's what PERMALINK is for.

      --
      If it's no on fire, it's a hardware problem.
    7. Re:FUD by jlarocco · · Score: 1
      AJAX can be considered a great technology because it's the only thing that provides a ubiquitous framework for asynchronous information transfer. It's a uber-shitty implimentation because Javascript was never intended to do anything like this. But the concept is cool. The implimentation is not.

      I think you meant "asynchronous information transfer, on a webpage". Which gets right to the root of the problem. People are trying to put everything in webpages, even when it doesn't make any sense or isn't the best option.

      I absolutely abhor "web applications." They're less responsive, harder to use, and never match the features of standalone applications.

      Look at the gigantic difference between Google Earth and Google Maps. Or between any webmail system and Sylpheed or Thunderbird. Or between YouTube's video player and xine or mplayer. The web applications are light years behind the standalone apps, in large part because they're using HTTP, HTML and Javascript in ways they were never intended to be used.

    8. Re:FUD by hobo+sapiens · · Score: 2, Informative
      Not being able to bookmark or use the back button? Those are gigantic problems.
      Agreed, but like I said...it depends on what you use AJAX for. Plus, AJAX uses HTTP to get and retrieve data, which can be use to make HTML. It doesn't bend them.

      For example, let's say you have a page where a user has some sort of an inbox from which the user can delete things, like system notifications. Next to each item, you have a delete link. Clicking on the link deletes the item, meaning javascript deletes the node from the DOM, and an AJAX call gets the thing deleted from the DB. Good use of AJAX. In fact, in an AJAX-less solution, ths user 1) has to wait for the whole page to reload, and 2) if the user presses the back button, depending on browser settings, the deleted events will seem to reappear. That could be confusing. This is one very simple example of where AJAX is great.

      Consider another example. A shared calendar web application, that builds a table server side, gets all the data, runs security checks on each event to see what the current user can do to each event, and then presents the data. Building the table server-side, then pumping out tons and tons of HTML code will not only tax your web server, but also generate unnecessary network traffic. You could pretty easily refactor this application to build the table client side, and then send the data to the client via a JSON object. Now, the server page that builds the JSON object is built to check the user's cookie or whatever you use for authentication and it only sends the data that the user can see. The client takes this data and build the content client side. This is the network equivalent of purchasing a disassembled computer desk and taking it home to assemble it rather than purchasing the floor model and trying to cram it into your Mazda Miata.

      I give these two examples because they are real life solutions I developed at work. Both are absolutely secure, and both save the user wait time. Also, these reduce the network and server load. What's not to like?

      Of course, if you design a website whose navigation controls use AJAX, or some other weird use of AJAX you will get interesting results, and by interesting I mean bad. No offense, but I think you are saying that AJAX is a bad technology perhaps because you just don't know enough about it.

      Both solutions are on an intranet, else I would gladly provide links. On the internet, would I use AJAX? Absolutely! I would, of course, use just a bit more caution...no, not because of security (I know how to make secure AJAX code) but because of browser compatibility. On the intranet, I use web standards and therefore all modern browser will work great. The nice thing is, though, you aren't going to have some weirdo using Netscape 3 or something like that. On the web, would I pander, er, I mean cater to this type of user? Depends on how much I needed them as a client.

      If you want to learn more about AJAX and effective javascript constructs like JSON, check out these links: http://www.sergiopereira.com/articles/advjs.html and http://www.sergiopereira.com/articles/prototype.js .html for starters. One of these is the documentation for the prototype library, which I would recommend. I don't usually like using other people's code libraries in languages like javascript, but this one is quite good.
      --
      blah blah blah
    9. Re:FUD by ralphdaugherty · · Score: 1

      That's just stupid. A well designed AJAX app is faster to use than a regular one. Page reloads suck for applications.

            And that's it in a nutshell, he's right (with his company's experience beta testing eight commercial apps using AJAX), and you're right.

            You're saying about the same amount of calls, bur more strategic and interactive in updating a portion of a web page.

            He's saying the commercial apps were making so many calls to be interactive (e.g. keystroke and mouseovers) that the servers were loading CGI programs many more times than with a full web page refresh.

            And like you say, it's all in design as to how effectively that server load - client interactiveness tradeoff is handled.

            I would say that developers would tend more toward PC app level interactiveness such as updating the data as you cursor up through a table at the cost of multiple CGI loads that a web page refresh wouldn't make.

            The proof is in what makes it out there, and he described eight commercial apps failing with the users. Reality trumps theory.

        rd

    10. Re:FUD by hobo+sapiens · · Score: 5, Insightful
      When it comes to sites using AJAX, such bookmarks are often not possible.
      My. Goodness.

      Look. It depends on HOW AND WHERE you use AJAX. Jeez!!! Can we please put this to bed? Yes, if you design a whole flippin site that is one page with a zillion AJAX calls, well, gee whiz! Bad idea! But, if you use your brain and use it only where it ADDS VALUE then maybe, just maybe, it's a good thing? You think? Just because beer is a good thing doesn't mean you pour it in your gas tank, use it to make Kool-Aid, or bathe in it. I am SICK (can you tell?) of people misusing technologies and then blaming the technologies! Stop it!!!
      --
      blah blah blah
    11. Re:FUD by tepples · · Score: 1

      People are trying to put everything in webpages, even when it doesn't make any sense or isn't the best option.

      What other form of application runs without a separate step of installation? And why does Windows make it so hard for a user to build a sandbox for an installed application?

    12. Re:FUD by jlarocco · · Score: 1
      What other form of application runs without a separate step of installation?

      That's your reason for accepting applications with few features and incredibly poor performance? That's like saying "I could make ten times more money, but then I'd have to pay more taxes." It doesn't make sense.

      And why does Windows make it so hard for a user to build a sandbox for an installed application?

      That's irrelevant. "Web applications" running in IE are no safer than any other application on Windows. Not that it matters. If one of your requirements was "Running applications securely", you wouldn't be running Windows.

    13. Re:FUD by Lobster+Quadrille · · Score: 1

      I hadn't played with Javascript too much until a client's requirements required some pretty heavy AJAX use recently. Now the more I use it, the more I like it. And hate it. It has the potential to be by far the coolest language I've worked with, but the implementation ruins it for me. I know I'm just stating the obvious here, but if the damn browsers (IE, mostly) would support standards, javascript would be one of the best things to happen to web application programming.

      --
      "The cup is in turn designed for holding hot or cold liquids, and has an open rim and closed base." --US Patent #5425497
    14. Re:FUD by fforw · · Score: 2, Insightful
      What other form of application runs without a separate step of installation?
      That's your reason for accepting applications with few features and incredibly poor performance? That's like saying "I could make ten times more money, but then I'd have to pay more taxes." It doesn't make sense.

      We are talking about websites/webapplications here. The question is not whether you can and want to install it, but whether the customers/target group of that website want to/can/will install it -- and the answer is no, they won't. Even the most trivial install will only be made by a small percentage of people.

      More than 90% of all webusers already have an AJAX-capable browser though.

      --
      while (!asleep()) sheep++
    15. Re:FUD by tacocat · · Score: 1

      Maybe someone will reinvent the FRAMES concept...

    16. Re:FUD by bodan · · Score: 1
      What other form of application runs without a separate step of installation?
      That's your reason for accepting applications with few features and incredibly poor performance? That's like saying "I could make ten times more money, but then I'd have to pay more taxes." It doesn't make sense.
      It's not as wrong as you make it sound:

      True, a dedicated application running locally is most of the time superior to a web one, enough so to justify the usually minor hassle of installing it.

      However, this cost is not always minor. Accessing gmail or gtalk or google maps from any computer with a web browser is much more important to me than having them run quicker, with less memory. (And in 3D, for the maps thing.) I've used these from school, other friend's computers, internet cafes, even a coin-operated internet terminal it a railway station. In most of these places I can't install programs or change POP settings. But I can log on to gmail or use google maps just fine. (OK, I have to risk keyloggers, but the "installing an app" way wouldn't help with that either.)

      Which, as a matter of fact, is what the whole point of AJAX is.

      --
      "I think I am a fallen star. I should wish on myself."
    17. Re:FUD by Anonymous Coward · · Score: 0
      But, if you use your brain and use it only where it ADDS VALUE then maybe, just maybe, it's a good thing? You think? Just because beer is a good thing doesn't mean you pour it in your gas tank, use it to make Kool-Aid, or bathe in it. I am SICK (can you tell?) of people misusing technologies and then blaming the technologies! Stop it!!!
      And I am sick of people like you who can't tell the difference between users and developers. Insulting someone with patronising comments like "use your brain" is hardly useful when the person in question is complaining about the misuse of AJAX by OTHER FUCKING PEOPLE that is making OUR lives a misery. This is not remotely comparable to putting beer in your fucking gas tank. The closest analogy would be if all the gas companies had decided to replace the gas in their pumps with beer. In which case, telling us we're stupid to be putting beer in our gas tanks is, like, kind of missing the point? You think?
    18. Re:FUD by hobo+sapiens · · Score: 1

      You don't read too well, do you?

      --
      blah blah blah
    19. Re:FUD by tepples · · Score: 1

      That's like saying "I could make ten times more money, but then I'd have to pay more taxes." It doesn't make sense.

      What about "I could make ten times more revenue, but due to the complexity of tax law that kicks in after a business exceeds a size determined by statute, I'd have to pay my accountants, lawyers, etc. so much that it would destroy my profit"?

    20. Re:FUD by Anonymous Coward · · Score: 0

      It depends on HOW AND WHERE

      This is the real problem, the people peddling their Ajax products have no intention on educating companies where and how to use Ajax. Vendors want companies to push as much functionality and personal data into these single page applications as possible. Ajax is a great technique for certain site enhancements but the browser was not intended to be a secure application container. Papers like this just expose issues with the underlying container and not the language itself.

    21. Re:FUD by The+Anomalyzer · · Score: 1
      I'm sorry, but I have to disagree. AJAX is NOT a great technology. It's a perversion. It bends HTTP and HTML to do things they were never meant to do.

      One might've said the same thing about the half-baked cooperative multitasking in early versions of MacOS and Windows, or "multiprogramming" work-arounds on old mainframe OSs like OS/360. But those "perversions" ultimately paved the way for modern preemptive multitasking systems on every desktop and server.

      In five to seven years, we'll likely be using an application-centered Web that had its roots in hacks and work-arounds like AJAX. Progress isn't always neat or pretty.

    22. Re:FUD by bunions · · Score: 1

      > The very nature of pages being assembled on the client-side dynamically is what prevents features like bookmarks from working.

      Like I said, that's simply not true. There's nothing about Ajax-style programming that prevents bookmarkability. Yes, it's a lot harder. But, as with everything in life, it's a tradeoff. Bookmarkability is hard in ajax apps, as is handling the back button properly.

      And, as someone else mentioned, POST breaks the back button just as effectively, but no one is standing up and advocating avoiding forms-based websites.

      --
      there is no need to sign your posts. this isn't usenet. your username is right there above your post. stop it.
    23. Re:FUD by maraist · · Score: 1

      Web applications are "always on" applications.. Something you can not do with even a laptop. With the knowledge of a URL, a username and password, you can access a service from anywhere on the planet, with as little as a cell phone.

      You don't have versioning nightmares.

      You don't have installation headaches.

      You don't have platform lock-in.

      You don't have OS restrictions.

      You don't have performance / hardware requirements.

      You don't have EULA's because..
          You don't have copyright infringement
          You don't have software co-mingling concerns

      You don't have tons of test platforms during development time.

      You don't have technical support calls out the ass (assuming your site has a standard user interface).

      You have intrinsically collaborative software.

      You don't have hard-drive crashing concerns / backup concerns.

      So I'm sorry if the UI experience isn't optimal for all circumstances, but I'm using online tax software exclusively.. Turbo tax can kiss my ass...

      --
      -Michael
    24. Re:FUD by jlarocco · · Score: 1
      One might've said the same thing about the half-baked cooperative multitasking in early versions of MacOS and Windows, or "multiprogramming" work-arounds on old mainframe OSs like OS/360. But those "perversions" ultimately paved the way for modern preemptive multitasking systems on every desktop and server.
      In five to seven years, we'll likely be using an application-centered Web that had its roots in hacks and work-arounds like AJAX. Progress isn't always neat or pretty.

      It's possible, but there's a difference between modern web applications and the early cooperative multitasking and multiprogramming systems. When those early systems were devised, there weren't any better ways of doing that stuff. They weren't ignoring existing technology just to meet needless requirements. These new web applications are reimplementing a bunch of stuff that's already been done, except making it needlessly use HTTP, HTML and Javascript.

    25. Re:FUD by Nevyn · · Score: 1
      For example, let's say you have a page where a user has some sort of an inbox from which the user can delete things, like system notifications. Next to each item, you have a delete link. Clicking on the link deletes the item, meaning javascript deletes the node from the DOM, and an AJAX call gets the thing deleted from the DB. Good use of AJAX.

      Depends, if you mean "I'm using a web browser as an email application, and with JS is closer to a real application than without" then sure, I can buy that. But here's an even better idea, don't go for a pale shadow of an application and just go with a real application. I hear there might be one or two real email applications available by now, and there might even be a network protocol or two if you want to store your email somewhere else.

      And it's very possible to have a low volume "inbox" without JS, and for those cases it's often much more usable than trying to create an almost application ... IMNSHO. It also works if you have a web browser that isn't trying to act like an application platform (Ie. JS disabled, for whatever reason).

      Consider another example. A shared calendar web application, that builds a table server side, gets all the data, runs security checks on each event to see what the current user can do to each event, and then presents the data. Building the table server-side, then pumping out tons and tons of HTML code will not only tax your web server, but also generate unnecessary network traffic. You could pretty easily refactor this application to build the table client side, and then send the data to the client via a JSON object.

      IMO that's one of the last things you need JS for. Instead of a doing a single SQL select for a month range you want ~31 seperate DB calls, HTTP requests (incl. authentication and logging etc.)? And all for what, so you don't have to create the "table" server side? ... I totaly fail to see how the server or client would prefer JS from a resource POV. And again ... you've totally destroyed the view of the calendar as HTML now, if the user doesn't have a client that happens to be a valid web application platform for your code you are giving out blank pages.

      After saying all that I do see some use for JS, but it's entirely as small seasonings on top of the HTML (and I've seen it used to enhance the UI well, when used in that way). But too often I see morons turning simple forms/links into JS dumping grounds, and then wording why everyone buys through Amazon instead.

      --
      ustr: Managed string API with ave. 44% overhead over strdup(), for 0-20B
    26. Re:FUD by tigersha · · Score: 1

      And there you just succinctly summarized the problem with AJAX: Nontrivial solutions to trivial problems. That, almost by definition, makes it a bad technology

      --
      The dangers of excessive individualism are nothing compared to the oppressiveness of excessive collectivism
    27. Re:FUD by ultranova · · Score: 1

      Bookmarking has been subverted way before AJAX came along. Any website generated from POST information can't really be bookmarked. That's what PERMALINK is for.

      That's why, after processing the POST data, you redirect to the same page, causing the browser to use GET and making the resulting page bookmarkable (and reloadable).

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

    28. Re:FUD by tacocat · · Score: 1

      I think you are absolutely right and to take it the next step. Until there are such standards there can be no security or belief that there is security.

    29. Re:FUD by hobo+sapiens · · Score: 1
      doing a single SQL select for a month range you want ~31 seperate DB calls, HTTP requests (incl. authentication and logging etc.)? And all for what, so you don't have to create the "table" server side?
      Zoiks! * falls out of chair *

      No, no, no. One DB call, one XMLHTTPRequest, which returns a JSON object.

      I did not provide all the details here just because I didn't feel like typing them. Let me just say this isn't a 31 day calendar, but more of a scheduling application for workgroups (I just used calendar for simplicity of discussion). This is an application that admittedly was not the best candidate for a web app, but I had to make it work (this is for work, mind you, so there are business constraints). Building the page server side, there were scalability issues, for example with a large workgroup (250 users) the page size was something like 4M for a monthly schedule (imagine a table 31 wide by 250 high, each cell having onclick, title, style attributes...*shudder*). This same workgroup, after making the schedule get all the data via JSON arrays and build *some* HTML client side (but not the entire page, just the schedule grid), the page size is <40K and the total data transfer is <200K, not to mention it loads much faster now, usually less than 4 seconds. If you want to know more for the sake of knowledge, I will give you more details. If you just wanna argue, then I won't waste my time (though your post doesn't sound argumentative).

      As for javascript compatibility/accessibility, I agree, not everything is a good candidate for this type of design. In fact, I'd say that you shouldn't use AJAX gratuitously. I am making a point to argue for AJAX as I am doing here because I feel like it is a valid and powerful tool. So is a jackhammer. That doesn't mean you use it to work on your car. In this case, it was either continue to kill the server or come up with a better way. I wasn't trying to go for "kewl" and bleeding edge. I simply needed a way to make an existing application work better.

      This is on an intranet, so I do have the benefit of knowing that most users are using something sane like IE7, Firefox, Opera, or less sane, IE6. There is nobody using IE3 or something else crazy, and if they are, well, frankly my dear, I don't give a damn. On the internet, I would probably take the same approach, that is unless I really had to appeal to *everybody* for some reason (like Amazon.com or a .gov site would). As for the uber paranoid javascript disablers, I put a noscript attribute so that these user can at least know they are missing the content. Have I had any complaints? Not a one, and users are required to access this site so that they can get their work schedules. This is in a corporate intranet environment, and people around here just *love* to complain.
      --
      blah blah blah
    30. Re:FUD by bunions · · Score: 1

      > Nontrivial solutions to trivial problems

      It's only trivial because it's easy in standard html. We could do the same thing with html:

      "It's almost impossible to simply update the current pages content without a refresh. Nontrivial solutions to trivial problems. That, almost by definition, makes it a bad technology"

      Or c:

      "You have to manage every single byte of RAM you use, unlike Java which simply garbage collects for you. Nontrivial solutions to trivial problems. That, almost by definition, makes it a bad technology"

      I could go on and on. You get the idea.

      --
      there is no need to sign your posts. this isn't usenet. your username is right there above your post. stop it.
    31. Re:FUD by einhverfr · · Score: 1

      I'm sorry, but I have to disagree. AJAX is NOT a great technology. It's a perversion. It bends HTTP and HTML to do things they were never meant to do. And because of that, it's not really surprising that it has so many huge problems. Not being able to bookmark or use the back button? Those are gigantic problems.

      I guess you can look at it this way.

      I don't think of it as being anything other than another tool that may or may not be appropriate for web apps. In many cases, AJAX in moderation can be helpful, but people often try to do way too much with it.

      It is often the developer rather than the tool.

      --

      LedgerSMB: Open source Accounting/ERP
  36. Meh... by Anonymous Coward · · Score: 3, Insightful

    I'm a professional web developer, amd have been using XMLHttpRequest (ajax, if you really want) for the past two years in a large number of web applications. Having taken the time to actually carefully read (not skim) the eight pages of this document, I have only one thing to say: I want my 15 minutes back.

    This is a paper about more efficient ways of being malicious, but they only work if you can be malicious in the first place.

    You know what? If a malicious user can insert script to be executed for another user, I already have an unacceptable problem! I really don't care if that unacceptable problem is now 10% worse than was generally realized before.

  37. Re:Have you ever tried to deploy an AJAX applicati by Zarel · · Score: 5, Insightful

    Have you ever considered that those could all be badly programmed? I mean, I could write a Java program that took tons of resources, ran really slowly, didn't allow text selection, and more. And I could write an Ajax application that ran far faster than the equivalent non-Ajax one.

    As for your specific case of a text field being unhighlightable, I suspect that has to do with the Ajax application using onSelectStart to disable selection within the page (sometimes as really crappy DRM, sometimes because click-and-dragging is needed for some other functionality), and not knowing how to re-enable it for the text field (which is something I, a 16-year-old, know how to do). Problems like the ones you describe are usually caused by vendor incompetence.

    Ajax, by itself, can't possibly cause any of the problems you describe. All it is is a system by which Web pages can interact with the server without needing to load a new page. This means:

    1. Less bandwidth is used because you don't need to load layout information for each page. Consequently, it's faster than non-Ajax applications.

    2. The Back button goes to the last page, as opposed to the last action, which is a good thing for true Web applications, since the Back button usually causes tons of problems (Ever seen "DON'T PRESS THE BACK BUTTON OR YOU COULD ACCIDENTALLY PAY FOR THIS PRODUCT TWICE"?).

    3. If coded to do so, the server can relegate translating raw data into a human-readable HTML layout to the client. This is usually done because the client usually has many processor cycles to spare, while the server doesn't. (This also doesn't take much processing power, and should be unnoticeable to the client)

    4. You have more control over page transitions, and you can have things like "Loading..." messages while the data is being fetched from the server (as opposed to traditionally, where the only indication is "Loading..." in the browser status bar and the top right loading animation, and then, when it loads, the page goes white and the new layout is loaded.)

    Those are the only differences. So, in reality, Ajax is superior in every way for Web applications, and the problems you describe are caused by bad programming practices, and would've happened whether or not they were written in Ajax.

    --
    Want a high quality FOSS RTS game? Try Warzone 2100!
  38. AJAX May Be Considered Harmful by Original+Replica · · Score: 2, Funny

    Damn Right! If you mix that stuff with a chlorine bleach, the fumes will put you straight in the morgue.

    --
    We are all just people.
  39. You missed a paragraph there by ubernostrum · · Score: 1

    This technique requires the prior existence of a full-exploitable XSS hole before it can work; otherwise the script which modifies object prototypes never loads and never executes. Again, the author of this paper is simply saying, "if your site has an XSS hole I can use an XSS exploit against it". This would be akin to a physical security expert pronouncing that he can get into your house if you leave your doors and windows unlocked, and is not earth-shattering or insightful in any way; the only reason it's getting press is the mistaken belief that use of object prototypes constitutes a never-before-seen technique, and that's debatable; even if no-one's ever actually tried a real-world exploit with this technique, any JavaScript programmer with his or her salt knows it's possible.

  40. "Death of the Internet" yet again by dpbsmith · · Score: 1

    (Yawn) Death of the internet, ho hum.

    It already died. In 1996. Bob Metcalfe said so, didn't he?

  41. you're correct, and I did read the article by sethawoolley · · Score: 1

    all the vulnerabilities discussed are not new.

    I'm not sure how they managed to convince anybody these are "new" to AJAX.

    Everybody's known about Javascript XSS issues for a while and the http cache/proxy issues as well

    Do they get bonus points for calling them AJAX vulns? I hope not.

    Fortunately, on my team, I'm not allowed to use AJAX (even XML-free Javascript) or Cookies to develop web applications -- for security reasons. Other teams have AJAX programmers on staff, but that's only for the slick b2c stuff, not the actual b2b stuff.

  42. stop people from using Microsoft Office by nurb432 · · Score: 1

    Yup, everyone i know has stopped using it.. Microsoft is going broke since they cant sell MSO anymore.

    Nah, people really dont care/understand/know.

    --
    ---- Booth was a patriot ----
  43. Re:Have you ever tried to deploy an AJAX applicati by 75th+Trombone · · Score: 4, Informative

    You've stated quite an amount of vagueness there, sir, not to mention this confounding statement:

    All of our AJAX trials were abysmal failures. That's why we're sticking with the existing Perl- and Java-based systems that we currently use.

    Very interesting, seeing has how AJAX has nothing to do with your server-side technology whatsoever. Or how about this:

    The AJAX applications did not conform to common practices (eg. copy-and-paste, textbox text selection, etc.

    Again very interesting, seeing as how AJAX itself has nothing to do with the way users interact with form elements.

    It sounds to me like either 1) you're BSing, which is my actual guess, or 2) your and your team have no idea how to actually code Javascript/AJAX/whatever, and you picked crappy packages off the internet and expected them to Just Work out of the box the same as your custom built solution.

    Your problems have had nothing to do AJAX; rather, they have had to do with either your lack of knowledge or your life as a Slashdot troll.

    --
    The United States of America: We do what we must because we can.
  44. An easy fix? by DigitAl56K · · Score: 1

    I'm no JS expert, but it would seem that an easy fix is simply to contextualize JS prototypes - One document/frame can't modify prototypes for another.

    1. Re:An easy fix? by porneL · · Score: 1

      That's the case already. I've checked Opera, Safari and (Gecko-based) Camino - all have completly separate set of prototypes for each frame, so you can't circumvent XSS protection using prototypes.

      So it seems there's nothing to get excited about - you must have exploitable XSS vulnerability to begin with, so it's not the end of the internet just yet.

  45. Not Hard To Prevent by MrMunkey · · Score: 1

    This has been partly covered by others already, but this attack really isn't that hard to prevent. In order to perform this attack, the attacker has to first be able to post JavaScript code onto the page. This would be something like putting JavaScript code into your posts on /. or some other website that allows people to author content on the Internet. /. is already safe from this attack. They don't let you put JavaScript code in your posts. That's pretty standard web programming security (filter input, escape output). I suppose he could still inject the code by putting javascript: [put code here] in the address bar. Don't believe me, try this... javascript: alert('It works'); But even then, the code injection is still limited to the attacker's session only. Oh, no! he can capture his own information. The world is comming to an end! On a serious note... I hadn't thought about extending XMLHttpRequest like that for a security vulnerability. I'd give him credit for thinking that up.

  46. I can see the author's point by davide+marney · · Score: 1

    I can see where attacking the prototype might expose some risks to phishing attacks. The attacker would need to get your domain to issue the bad script code, so the usual hardening techniques (don't trust input, don't accept any executable script code, etc.) would help.

    I'm wondering if making the hard-to-guess pointers to standard objects (xmlHttpRequest) could neuter this attack. When your page first starts, you copy the standard prototypes to function names known only to your server.

    --
    "We receive as friendly that which agrees with, we resist with dislike that which opposes us" - Faraday
  47. prototype overloading is not special by sethawoolley · · Score: 2, Informative

    Prototype overloading isn't special. It's no more risky than getting the opportunity to run _any_ code against the target. You still need to craft exploits directly against the websites in use, except the easier passive sniffing of the native xml functions might mean less code has to be inserted in the client side. You still have to know what to do with the sniffed data on a per-site/program basis.

    I just consider this an efficient use of javascript. It's not enabling anything that couldn't be done already.

    The important user data for almost all sites is stored on the server anyways, not being sent over the wire, and if it were, it would require much specific effort to make the data usable.

    It's not a new class of vulnerabilities, it's merely a new minor exploit technique of already-existing vulnerabilities. It doesn't decrease anybody's actual security.

  48. You're confusing protocol and applications. by Anonymous Coward · · Score: 0, Insightful

    You're confusing the AJAX protocol with a complete AJAX application. I'm talking about complete applications, involving both the client-side and the server-side. After all, a protocol is pretty useless unless there are applications involved making use of that protocol.

    Very interesting, seeing has how AJAX has nothing to do with your server-side technology whatsoever.

    Excuse me? AJAX is intimately involved with server-side technology. After all, there has to be some recipient on the server-side to respond to the AJAX requests sent by the client's Web browser. You can rarely build a useful AJAX application without involving a server of some sort. When designing an AJAX application, one must take into account server resource usage. Unfortunately, it often proves to be greater than when one is using a more traditional Web application development approach, including CGI scripts, PHP, JSP, etc.

    Again very interesting, seeing as how AJAX itself has nothing to do with the way users interact with form elements.

    Again, you're confusing protocol with applications. We're talking about AJAX applications here, many of which do end up using JavaScript to mess around with UI elements. This often leads to non-standard behavior which confuses users to no end.

    your and your team have no idea how to actually code Javascript/AJAX/whatever, and you picked crappy packages off the internet and expected them to Just Work out of the box the same as your custom built solution.

    Between the 9 of us, we have around 95 years of Web development experience. We know what we're doing. And we can also identify poor technology, AJAX being the latest example. Had you read my post, you would have read that we even worked with the vendor of one of these commercial products to improve its performance with our installation (to no avail, I may add). I'd like to name names, but I don't think I'm in the position to do so right now.

    1. Re:You're confusing protocol and applications. by misleb · · Score: 1
      You're confusing the AJAX protocol with a complete AJAX application. I'm talking about complete applications, involving both the client-side and the server-side. After all, a protocol is pretty useless unless there are applications involved making use of that protocol.


      The only difference in an "ajax applicaiton" as far as the server is concerned is that it renders XML rather than HTML. Otherwise, a GET request is a GET request.

      Excuse me? AJAX is intimately involved with server-side technology. After all, there has to be some recipient on the server-side to respond to the AJAX requests sent by the client's Web browser. You can rarely build a useful AJAX application without involving a server of some sort. When designing an AJAX application, one must take into account server resource usage. Unfortunately, it often proves to be greater than when one is using a more traditional Web application development approach, including CGI scripts, PHP, JSP, etc.


      You do understand that you can use CGI, PHP, JSP, etc to implement the server side of an AJAX web app, don't you? What else would you use?

      Again, you're confusing protocol with applications. We're talking about AJAX applications here, many of which do end up using JavaScript to mess around with UI elements. This often leads to non-standard behavior which confuses users to no end.


      An example?

      Between the 9 of us, we have around 95 years of Web development experience. We know what we're doing.


      If you think that "CGI, PHP, JSP, etc" are are entirely different than and opposed to "AJAX" then you clearly don't know what your doing. What do you think is responding to requests on the server side in an "AJAX application?" Do you not realize that one could easily use PHP, CGI (perl, ruby, etc), or Java to respond to AJAX requests?

      And we can also identify poor technology, AJAX being the latest example. Had you read my post, you would have read that we even worked with the vendor of one of these commercial products to improve its performance with our installation (to no avail, I may add). I'd like to name names, but I don't think I'm in the position to do so right now.


      You're posting as AC. What better position could there be to post such information?

      -matthew

      --
      "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
    2. Re:You're confusing protocol and applications. by NickFortune · · Score: 0, Troll
      You're confusing the AJAX protocol with a complete AJAX application.
      Of course, strictly speaking, AJAX isn't a protocol at all. A protocol is a formally defined set of rules for comminicating between two points endpoints. AJAX is a loose term for a new style of web application that generally uses Asynchronous HTTP, Javascript, And XML. It also generally uses CSS for formatting and may make use of Dynamic HTML. The only protocol in sight is HTTP, and normal web pages use that as well.

      Very interesting, seeing has how AJAX has nothing to do with your server-side technology whatsoever.
      Excuse me? AJAX is intimately involved with server-side technology.
      mmm... in your earlier post you said you were sticking to with Perl and Java based systems rather than AJAX. I think the GP was making the point that there's no reason you can't code AJAX backends in Java or Perl. I think by technology he meant the programming languages used.

      Again very interesting, seeing as how AJAX itself has nothing to do with the way users interact with form elements.
      Again, you're confusing protocol with applications. We're talking about AJAX applications here, many of which do end up using JavaScript to mess around with UI elements. This often leads to non-standard behavior which confuses users to no end.
      Lot's of non-AJAX web apps do the same thing. Dynamic HTML has been around for a while now. And AJAX is still not a protocol.

      Between the 9 of us, we have around 95 years of Web development experience. We know what we're doing.
      Well, you either don't understand what a protocol is, or you're real fuzzy on the idea of AJAX. Maybe you should put one of the other 8 guys on the line.
      --
      Don't let THEM immanentize the Eschaton!
    3. Re:You're confusing protocol and applications. by ralphdaugherty · · Score: 1

      Well, you either don't understand what a protocol is, or you're real fuzzy on the idea of AJAX. Maybe you should put one of the other 8 guys on the line.

            What a bunch of nit picking bs. He's supposed to refer to AJAX as "use of a non-standard MSFT HTTP hack eventually picked up by the other browsers" instead of "protocol"? Spare me.

            And the rest of his original post was perfectly clear as well, such as server resources required to service the MSFT hack call. (Is that ok with you? I hope so.)

            Loading a CGI program for freakin keystrokes. What a concept.

        rd

    4. Re:You're confusing protocol and applications. by NickFortune · · Score: 1
      What a bunch of nit picking bs. He's supposed to refer to AJAX as "use of a non-standard MSFT HTTP hack eventually picked up by the other browsers" instead of "protocol"? Spare me.

      You seem to be referring to the XMLHttpRequest object. XMLHttpRequest is central to AJAX programming, however it isn't the same thing as AJAX either. AJAX is a loose collection of web development techniques usually including Asynchronous HTTP JavaScript, CSS, Dynamic HTML and XML. To confuse any one of these with AJAX itself suggests a fundamental ignorance of the subject.

      He's supposed to refer to AJAX as "use of a non-standard MSFT HTTP hack eventually picked up by the other browsers" instead of "protocol"?
      Well, he could refer to the XMLHttpRequest object, if that was what he meant. Then at least we'd be clear as to what he meant.

      Spare me.

      The poster you're so keen to defend didn't understand the difference between a AJAX and a protocol. You don't seem to understand the difference between AJAX and a JavaScript object. Still, at least you're not claiming to be 11% of 95 years of web development experience. If your AC friend, if he's going to be so snotty in his replies he'd be best advised to get his facts straight. Doubly so if he intends to claim to be an authority on the subject.

      --
      Don't let THEM immanentize the Eschaton!
    5. Re:You're confusing protocol and applications. by ralphdaugherty · · Score: 1

      To confuse any one of these with AJAX itself suggests a fundamental ignorance of the subject.

            There was no confusion in what I said. I referred to it a MSFT HTTP hack, and you named it.

      Doubly so if he intends to claim to be an authority on the subject.

            Plenty of people call it a protocol, but his authority was real life experience. And he was a lot more patient responding to you than most people would, like me for example.

        rd

    6. Re:You're confusing protocol and applications. by 75th+Trombone · · Score: 1

      Excuse me? AJAX is intimately involved with server-side technology.

      Yes, yes, but what I meant, as the other guys figured out, was that "Perl and Java" and "AJAX" are not mutually exclusive, as you directly implied.

      Again, you're confusing protocol with applications.

      I think you're the one who's doing that, since you seem to think a representative way to use AJAX is to drop in a whole new application, instead of identifying places in your current application where the AJAX protocol (I'm not nitpicky about that word) could be helpful and coding those uses into your CURRENT application.

      And we can also identify poor technology, AJAX being the latest example.

      You just accused me of conflating the protocol with the applications, and yet here you are dismissing the protocol because of other people's applications!! Until you are actually familiar yourself with coding AJAX yourself, identified places in your current application where it might be of benefit, and given a few trial runs to iron out problems, I have no reason to believe that you "know what [you]'re doing" with regards to AJAX.

      (On the plus side, however, I no longer think you're a troll...)

      --
      The United States of America: We do what we must because we can.
    7. Re:You're confusing protocol and applications. by NickFortune · · Score: 1
      There was no confusion in what I said. I referred to it a MSFT HTTP hack, and you named it.

      Uh-huh.The AC you're defending with such vigour said there was an AJAX protocol. There isn't. You suggested

      He's supposed to refer to AJAX as "use of a non-standard MSFT HTTP hack eventually picked up by the other browsers" instead of "protocol"?

      So if you knew that XMLHttpRequest was no better in context than protocol, then why bother raising the subject? You could have said something like he's supposed to call AJAX "a catch all phrase for a collection of web development techniques centred around asynchronous HTTP and usually including client side scripting, dynamic HTML, CSS and XML data formats". That way you'd have kept the snide tone, but at the same time we'd have to accept that you know what you're talking about. As it is, you come across as just as ignorant and opinionated as the AC that started the whole mess.

      Plenty of people call it a protocol

      Lots of people think the Earth is flat. Good luck citing them as an authority on Slashdot.

      his authority was real life experience
      Allegedly. There's not much evidence of that in his posts however. Not only was confusion on the subject of protocols, the AC also cheerfully conflated AJAX with programming languages, and still doesn't seem to appreciate the difference.

      he was a lot more patient responding to you than most people would, like me for example
      Didn't come across that way to me. Maybe it's just that I tend to interpret rebuttals that start with "Excuse me?" as being overly aggressive.

      All the same, if he'd either been technically correct, or if he hadn't claimed authority based on personal experience, I'd probably not have bothered.
      --
      Don't let THEM immanentize the Eschaton!
    8. Re:You're confusing protocol and applications. by douceur · · Score: 1

      Just for the record, imho, you were neither nitpicky nor impatient. For that matter, you were also right. When it comes to technical discussions, it's often very important to understand the terms one is throwing around. The AC clearly has no idea what AJAX actually is or how to use it intelligently.

  49. What's really going on here. by Animats · · Score: 3, Insightful

    Nobody is explaining this right.

    JavaScript has a security policy. The security model is that 1) scripts can only talk to the site from which the script came, and 2) scripts can only alter documents from the site from which the script came. The security model is enforced only at a few points, notably the XMLHttpRequest object and at points where Javascript stores into the document object tree.

    Other than those few enforcement points, JavaScript objects in the same browser instance can communicate freely. This offers a number of potential exploits, some of which are listed in the paper.

    If the security model is tightened up, prohibiting all intercommunication between Javascript objects from different sites, "mashups" no longer work, so it's too late to tighten this up without breaking some popular sites.

    This is going to be hard to fix without breaking existing programs. Javascript has a very weak concept of what's immutable. It might work to mark functions as "dirty" if changed once loaded, then forbid "new" on "dirty" functions. That would prevent changing the base instance of a class without breaking too much else, and would fix this new vulnerability. But it wouldn't fix all potential vulnerabilities in that area. As long as multiple scripts share global variables, there's going to be potential for trouble.

    Maybe "https" pages should be locked down more. "Secure" pages should be single source - everything has to come from one specific domain address. No frames, no cross-site anything - one secure site per window, and no shared data with other pages whatsoever. That's a start.

    1. Re:What's really going on here. by zapov · · Score: 1

      "2) scripts can only alter documents from the site from which the script came."

      I had a project for cross-domain XMLHttpRequest and it's really not hard to implement.

      Regarding the article... I really don't get the point of the document?
      If someone inserts something in your page he could do XSS?
      So what? If your site is subject of code inserting, is the XSS really the biggest problem?

  50. Neuromancer by noz · · Score: 3, Funny
    ... a possible Web Worm that lives in the very fabric of Web 2.0 and could kill the Web as we know it.
    My deck is damaged. I must break through the ICE! Where are my Yeheyuans?
  51. Re:Have you ever tried to deploy an AJAX applicati by misleb · · Score: 3, Informative
    On the server-side, they'd again result in excessive CPU and RAM consumption.


    I'm going to call bullshit here. An ajax application is not significantly different on the server side than a regular web app. In fact, it is often easier on the server because the server only needs to render a small portion of the result for a given action rather than and entirely new page.

    The Perl-based system was on a couple of 200 MHz Pentium systems, each with 128 MB of RAM. Even after assistance from the AJAX-based Webmail system's vendor, we were only able to handle roughly 90% of the number of transactions of our older system.


    What does "perl based" have to do with it? You could very well have a Perl based (on the server side) AJAXy application.

    All of our AJAX trials were abysmal failures. That's why we're sticking with the existing Perl- and Java-based systems that we currently use.


    Bullshit again. You are comparing AJAX with Perl/Java based systems as if there was any comparison to be made. Saying Perl based systems are better than AJAX systems is like saying roads are better than cars!

    But thanks for you input anyway, Mr. Coward.

    -matthew
    --
    "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
  52. Re:Have you ever tried to deploy an AJAX applicati by Zarel · · Score: 3, Insightful
    Sure. And the very "design" of AJAX encourages such poor development to occur. The fact that virtually every AJAX application is problematic shows that the problem is not with the developers, but with the technologies those developers are trying to use.

    Have you missed the portion of my post where I explained exactly what Ajax was? It's just a JavaScript library that allows the page to communicate with the server without clicking a link and bringing up a new page. How does that encourage poor development?

    And I have to dispute your claim that "virtually every Ajax application is problematic". I've seen plenty of places where Ajax is used effectively - Google Maps and GMail, to name two. Maybe in your experience, they are, but, as they say, the plural of "anecdote" is not "data".

    Now I understand why you don't comprehend anything about how ineffective and pathetic real development is when using AJAX. Come back when you've had to deploy a real system, jimbo. You know, where it actually has to work. If you brought up an AJAX "solution" at the firm where I work, the rest of us would laugh at your sorry ass for suggesting a technology that fails in so many obvious and integral ways.

    Care to give examples of these "obvious and integral ways"? I have deployed real systems, and they have worked, and I haven't come across any of the problems you've mentioned.
    --
    Want a high quality FOSS RTS game? Try Warzone 2100!
  53. Now you yell me! by noidentity · · Score: 1

    Sure, tell me that Ajax is harmful, after I've just eaten a meal I made with it. Why don't they put this on the warning label??

  54. Re:Have you ever tried to deploy an AJAX applicati by Anonymous Coward · · Score: 0

    Sure. And the very "design" of AJAX encourages such poor development to occur. The fact that virtually every AJAX application is problematic shows that the problem is not with the developers, but with the technologies those developers are trying to use.

    Err... what? Are you saying that when I go to this-magical-php-script.com and download a bunch of PHP apps made by $0M3.Kr@zY.GuY and they don't work that PHP is a design flawed language?

    What's your point? That's exactly how Java applications work: poorly. Java applications are often just as problematic as AJAX applications, in most cases.

    Are you saying Java apps work poorly? I can understand you commenting on how AJAX apps are, on the whole, not working out very well as you have the initial "Holy crap new hype" bloom if junky software developers trying to make a few bucks while people don't understand the language. What I can't understand is how you can say the Java apps work poorly. Have you run any Java apps on your systems - from real vendors? I'm not talking about "Pizza Joes Amazing Taxes Pro Java Edition" but something more... interesting: http://www.sun.com/software/index.jsp

    I just got to the part of your post where you say that you're 16

    Just because someone's young doesn't mean that they're stupid. When I was 19, coming out of College, I did placement where I had to roll out a Windows 2000 upgrade in an existing RedHat + Windows NT + Solaris setup. Was I young and I did the job - reading does wonders to expand on what you don't know. Now they have a lot more resources online you can pick through for answers.

    In the end, Mr. Anonymous, you should be giving helpful remarks to the rest of us as to where we shouldn't be going for our apps. Giving vague examples of this-and-that app didn't work, this-and-that old Perl app was amazing doesn't help anyone. Give us some meat to chew on, not empty angry remarks.

  55. Re:Have you ever tried to deploy an AJAX applicati by Anonymous Coward · · Score: 0

    An ajax application is not significantly different on the server side than a regular web app. In fact, it is often easier on the server because the server only needs to render a small portion of the result for a given action rather than and entirely new page.

    In theory it is "easier" on the server. But what we actually find is that the overhead of the requests can be greater. This happens when too many AJAX requests are made to generate a page. Soon the overhead of the request made by each individual AJAX request, plus the XML processing on the server-side, end up consuming more CPU and RAM than would be consumed had a typical CGI, PHP, JSP, etc., script been run.

    What does "perl based" have to do with it? You could very well have a Perl based (on the server side) AJAXy application.

    I could have been more clear here. The existing system is basically a number of CGI scripts written in Perl. A request is made, the script is executed, the full page is generated, the full page is sent to the client, the script is terminated.

    You are comparing AJAX with Perl/Java based systems as if there was any comparison to be made. Saying Perl based systems are better than AJAX systems is like saying roads are better than cars!

    What we're comparing is, in this instance, two Webmail applications. One is implemented as a number of Perl-based CGI scripts. The other is written using AJAX. The functionality being tested is equivalent in both, for the most part. The AJAX script does some work on the client-side which is just not necessary with the Perl CGI scripts, as would be expected.

    And what we find is that the Perl-based system is far more efficient, even if it is generating an entire page for each request. We have been successfully running it on what is today considered rather ancient hardware: two 200 MHz Pentium systems, with 128 MB of RAM in each. Yet the AJAX implementation, running on an extremely powerful quad-core Opteron system with 8 GB of RAM, couldn't handle as many concurrent clients as our Perl-based CGI system could. Even with the AJAX application vendor's help we only managed to get the AJAX system to handle 90% of the load of the existing Perl-based system.

    Really, I don't care if you think I'm full of shit. What I can tell you is that I have tried the technology you support, and I found it to be nonsense. It has numerous technological flaws, and it seems that developers, even highly talented ones, are unable to develop quality software using it. Blab about the "greatness" of AJAX all you want. Those of us who have actually tried it know how much of a failure it is. We'll continue to use techniques and technology that actually works, while talking heads like yourself advocate AJAX and other fecal technologies that just can't carry their weight. Have yourself a good day, sir.

  56. The web as I know it.... by fotbr · · Score: 1

    Doesn't include javascript.

  57. Re:Have you ever tried to deploy an AJAX applicati by Anonymous Coward · · Score: 2, Informative

    Err... what? Are you saying that when I go to this-magical-php-script.com and download a bunch of PHP apps made by $0M3.Kr@zY.GuY and they don't work that PHP is a design flawed language?

    We actually stuck with only commercial vendors for the AJAX apps we tried. We even worked with one of them to try to improve the performance of their Webmail product, with no avail. Read my original post for more details.

    Are you saying Java apps work poorly?

    Performance-wise, yes. In terms of resource usage, yes. We have deployed a number of commercial groupware systems implemented in Java, as well as several implemented in Perl. We have found the Perl systems to perform far better. We'd take the time to try to figure out why the Java solutions perform so poorly, but it just wouldn't be feasible. The Perl solutions meet our needs more than adequately, so we use them.

    Just because someone's young doesn't mean that they're stupid.

    I didn't say he was stupid. I suggested he was inexperienced. And when it comes to deploying web applications to be used in a business environment by several thousand users at a time on a near-constant basis, experience is key.

    Until one has actually had to deal with the performance issues of such environments, one cannot have a real appreciation of the difficulties that will be faced. And yes, that may mean finding that the technologies that make you feel all warm and fuzzy inside (AJAX, for instance) just don't cut it. When faced with empirical evidence that such technologies as AJAX just don't cut it, the best thing to do is to admit that they can't be used. Arguing against real-world experience and results does nothing to change the fact that the performance and development limitations of AJAX are problematic for many users.

    In the end, Mr. Anonymous, you should be giving helpful remarks to the rest of us as to where we shouldn't be going for our apps.

    I am. I'm telling you to avoid AJAX at all costs. My original post explained the problems we encountered with a number of commercial AJAX applications of various sorts. I even broke it up into four categories of problems for you. Go back and read it.

  58. What's new about this? by Anonymous Coward · · Score: 0

    I may be missing something here, but this is nothing to do with AJAX in particular. What the article appears to demonstrate is that if you can do javascript code injection (the real vulnerability), then you can subvert the functionality of any javascript object by using the prototype system. But if you can inject code, then you can inject any code you like; you could create an AJAX reporting system even if one didn't exist already, or you could create invisible frames on the page which could submit regular forms to your server without using AJAX. Basically, if you can inject javascript code into a page, then you can make the page do anything javascript can do. How is this new, and how is it a particular flaw of AJAX? Isn't the flaw whatever problem (XSS or whatever) allows you to inject code in the first place?

  59. Re:Have you ever tried to deploy an AJAX applicati by Zarel · · Score: 1
    We actually stuck with only commercial vendors for the AJAX apps we tried. We even worked with one of them to try to improve the performance of their Webmail product, with no avail.

    You worked with one of them to improve the server-side performance of their Webmail product, which has absolutely nothing to do with Ajax, to no avail.

    And, earlier, you said:
    Sure. And the very "design" of AJAX encourages such poor development to occur. The fact that virtually every AJAX application is problematic shows that the problem is not with the developers, but with the technologies those developers are trying to use.

    If said commercial vendor had problems with the server-side performance, a technology that has nothing to do with Ajax, I think the problem is with the developers.

    I didn't say he was stupid. I suggested he was inexperienced.

    And I replied that I am not.

    When faced with empirical evidence that such technologies as AJAX just don't cut it, the best thing to do is to admit that they can't be used.

    You gave anecdotal evidence. I supplied plenty of counterexamples: GMail and Google Maps.
    --
    Want a high quality FOSS RTS game? Try Warzone 2100!
  60. Re:Have you ever tried to deploy an AJAX applicati by NickFortune · · Score: 1
    One is implemented as a number of Perl-based CGI scripts. The other is written using AJAX.

    You are aware that AJAX is not a programming language, I take it?

    Let's compare apples to apples. On the one hand you have a server side webmail system implemented using Perl, and I assume the tried and tested CPAN CGI modules. On the other hand you had an AJAX backend written in what language and implemented using what (if any) third party components?

    If you want to be taken seriously, you need to provide this information. Otherwise a lot of people are going to conclude that you're just blowing FUD

    --
    Don't let THEM immanentize the Eschaton!
  61. Re:Have you ever tried to deploy an AJAX applicati by Zarel · · Score: 1
    In theory it is "easier" on the server. But what we actually find is that the overhead of the requests can be greater. This happens when too many AJAX requests are made to generate a page. Soon the overhead of the request made by each individual AJAX request, plus the XML processing on the server-side, end up consuming more CPU and RAM than would be consumed had a typical CGI, PHP, JSP, etc., script been run.
    Well, the obvious solution is not to make so many Ajax requests to generate a page. You only need one.

    It has numerous technological flaws, and it seems that developers, even highly talented ones, are unable to develop quality software using it.
    Name one technological flaw, then. And I doubt "highly talented developers" would design a system that uses multiple Ajax requests to generate a page and then blame the resultant server slowdown on Ajax.
    --
    Want a high quality FOSS RTS game? Try Warzone 2100!
  62. Re:Have you ever tried to deploy an AJAX applicati by Anonymous Coward · · Score: 0

    You gave anecdotal evidence. I supplied plenty of counterexamples: GMail and Google Maps.

    You mean that fly by night organization, what is the name of that place.... err.... oh yeah, Google. I mean come on, they can't possibly know what they are doing, after all everything they write is in "Beta" for years. :)

  63. Re:Have you ever tried to deploy an AJAX applicati by Tack · · Score: 1
    What we're comparing is, in this instance, two Webmail applications. One is implemented as a number of Perl-based CGI scripts. The other is written using AJAX.

    But surely you can understand where all the confusion (and hostility) is coming from surrounding all your posts. You seem to be referring to AJAX as some sort of encompassing language and application framework on both client and server. An AJAX application could quite easily be Perl-based CGI scripts on the server side too.

    I'm not saying you're wrong that thus far in practice AJAX applications require more server-side resources. For example perhaps what would conventionally be handled by a single request is handled by N XMLRPC calls, and so the overhead of a request (which includes gathering session data and authenticating) is done N times. But this isn't a fundamental property of AJAX.

    Also, aside from the hidden iframe trick (which remains fringe), the whole asynchronous web app paradigm is still fairly young, and there is plenty to be learned. I'm happy to believe that AJAX amplifies bad programming and bad design, and since the overwhelming majority of programmers suck -- and sucky programmers tend to be the early adopters, while the experienced software engineers are far more skeptical and conservative -- we are inundated with garbage AJAX webapps, and therefore the (naive) conclusion to be drawn is that AJAX sucks. But I think that's premature.

  64. Re:Have you ever tried to deploy an AJAX applicati by bunions · · Score: 4, Funny
    It's just a JavaScript library that allows the page to communicate with the server without clicking a link and bringing up a new page. How does that encourage poor development?


    By enabling development to occur at all. The program that is never written has zero bugs and is therefore the perfect program.
    --
    there is no need to sign your posts. this isn't usenet. your username is right there above your post. stop it.
  65. You dont need vulnerability in components by unity100 · · Score: 1

    for ajax to be harmful - what you are doing with ajax is delegating the running of some operations to the client side - you may not use it for harmful purposes maybe, but if ajax gets widespread use and acceptance, same people who used anything invented before to evil purposes will.

  66. Old news! by chiller2 · · Score: 1

    They've known this since 1978 (see last paragraph) ;)

    --
    --- Commission free trading & free stock up to $500 - use http://share.robinhood.com/kelvinp6 :)
  67. kill the Web as we know it by plopez · · Score: 1

    Sounds like hype and sensationalism to me. But really, if true, would that be a bad thing?

    I mean the we is a series of hacks. It was never designed to do the things it is being asked to do. Maybe a step back and rethinking of the technology is in order.

    --
    putting the 'B' in LGBTQ+
  68. Re:Have you ever tried to deploy an AJAX applicati by misleb · · Score: 1
    n theory it is "easier" on the server. But what we actually find is that the overhead of the requests can be greater.


    Now you're really showing your ignorance. A GET request is a GET request.

    This happens when too many AJAX requests are made to generate a page.


    It depends on the framework, of course, but usually the initial page is generated through normal means. At least that is how AJAX works when using Ruby on Rails.

    Soon the overhead of the request made by each individual AJAX request, plus the XML processing on the server-side, end up consuming more CPU and RAM than would be consumed had a typical CGI, PHP, JSP, etc., script been run.


    How is processing XML any more intensive than processing HTML? And why do you keep making some distinction between CGI and AJAX?

    I could have been more clear here. The existing system is basically a number of CGI scripts written in Perl. A request is made, the script is executed, the full page is generated, the full page is sent to the client, the script is terminated.


    As opposed to an AJAX request being made, the script is executed, some XML is generated (less than the size of a full page), and the scrpt is terminated. Now what makes them so fundametally different?

    What we're comparing is, in this instance, two Webmail applications. One is implemented as a number of Perl-based CGI scripts. The other is written using AJAX. The functionality being tested is equivalent in both, for the most part. The AJAX script does some work on the client-side which is just not necessary with the Perl CGI scripts, as would be expected.


    There is no such thing as an "AJAX script." You're talking about AJAX as if it were a language. It is not. You're not making meaningful comparisons.

    And what we find is that the Perl-based system is far more efficient, even if it is generating an entire page for each request. We have been successfully running it on what is today considered rather ancient hardware: two 200 MHz Pentium systems, with 128 MB of RAM in each. Yet the AJAX implementation, running on an extremely powerful quad-core Opteron system with 8 GB of RAM, couldn't handle as many concurrent clients as our Perl-based CGI system could. Even with the AJAX application vendor's help we only managed to get the AJAX system to handle 90% of the load of the existing Perl-based system.


    Why is it that you can't seem to be more specific about this "AJAX system?" Not once have you actualy described its real architecture. What was the backend written in? Why did you see fit to "upgrade" your apparently awesome perl based system in teh first place? Clearly something was lacking.

    Really, I don't care if you think I'm full of shit. What I can tell you is that I have tried the technology you support,


    You have no idea what I "support," coward.

    and I found it to be nonsense.


    Like your posts.

    and it seems that developers, even highly talented ones, are unable to develop quality software using it.


    I dunno. People seem to like Gmail a lot.

    Blab about the "greatness" of AJAX all you want. Those of us who have actually tried it know how much of a failure it is. We'll continue to use techniques and technology that actually works, while talking heads like yourself advocate AJAX and other fecal technologies that just can't carry their weight. Have yourself a good day, sir.


    Talking head??? ROFL!

    -matthew

    --
    "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
  69. Javascript Rules by Joebert · · Score: 1
    --
    Wanna fight ? Bend over, stick your head up your ass, and fight for air.
    1. Re:Javascript Rules by scottschiller · · Score: 1

      You have got to be kidding me. How long has that one been open for?

    2. Re:Javascript Rules by Anonymous Coward · · Score: 0

      Years, but there was an article about on /. last week. It's more of a flaw in Acrobat Reader than Javascript itself.

  70. FEATURE is a bug? Wake me up when.. by bussdriver · · Score: 1

    The best feature of Javascript is the ability to alter objects!

    Just like your DESKTOP, if you include libraries that are not safe, they have total control over your memory space...

    Seriously, we need a REAL TWO WAY TCP protocol accessible to javascript which sends and receives TEXT with any other server. Then add a parse to xml feature to create an XML dom object. Its STUPID to always pass xml/soap all the time; furthermore, its STUPID to have a one-way street. It encourages polling which can generate massive server load.

    We have been using this frame-hack method and further hacked into XMLHttpRequest for far too long! I prefer the old javascript hack with JSON.

    We are still working from hacks when we should have a DESIGNED solution!

    I think we NEED the ability to override the access/assign of properties with functions!
    Imagine finally being able to add an object like .style to MSIE which when used just forwards to MSIE's embedded style object! You could code to standard and just include a javascript "patch" which makes bad browsers work properly! We re-invent and re-use the same dom hacks when they should just be an include that fixes browser dom bugs.

    Mozilla already has features along this line already. (but Firefox works, so they are not needed much.)

    Keep your eyes open for when domfu.org gets online. I hear their goal is javascript browser patches.

  71. Re:Have you ever tried to deploy an AJAX applicati by mgiuca · · Score: 2, Insightful

    It sounds like you have issues with these specific products; I don't see how you can apply this to all of AJAX.

    From what I understand, AJAX would be a bitch to program right, and comes with a whole lot of issues that you describe for the programmer to sort out. But there are some clear success stories - gmail being the obvious one. Gmail started out with a couple of these issues, but google have been steadily fixing them and now it's slick and a great user experience.

    And this is rather off-topic since it has nothing to do with the security vulnerabilities in TFA.

  72. C May Be Considered Harmful by Anonymous Coward · · Score: 0
    Subverting C:
    1. nm -D /some/binary
    2. Choose a dynamic loaded symbol
    3. Reimplement it in your evil library
    4. gcc -fPIC -shared -o evil.so evil.c
    5. LD_PRELOAD=./evil.so /some/binary
    6. Sorry, this list doesn't end with "Profit!!"
    Btw, this requires access to the binary and it can't be suid, BUT YOUR SUBVERTING IT!!!!!! And remember, kids: in Soviet Russia AJAX subverts you, Al Gore invented AJAX and Chuck Norris could subvert AJAX using a Beowulf cluster of... AJAX?!
  73. Re:Have you ever tried to deploy an AJAX applicati by ralphdaugherty · · Score: 1

    I'm sorry to say it, but AJAX might just be the worst technology I have ever had to deal with.

          Parent post should go on AJAX's headstone.

      rd

  74. Re:Have you ever tried to deploy an AJAX applicati by matrixhax0r · · Score: 2, Insightful

    Uh huh. Oh, I just got to the part of your post where you say that you're 16. Good job with the ad hominem attack. Come back and try again.
    --
    If it's no on fire, it's a hardware problem.
  75. Re:Have you ever tried to deploy an AJAX applicati by Anonymous Coward · · Score: 0

    Now you're really showing your ignorance. A GET request is a GET request.

    You're missing his point, I think. Yes, a request is a request, but where a conventional webapp makes a single request to load the page, some AJAX webapps will make several. It's a sign of badly written apps more than of weakness in the AJAX concept, but a quite a few of them end up replacing one large request-response with many smaller ones.

    Plus, highly interactive pages may be making a *lot* of requests in response to user activity. That's partly avoidable, but also just a consequence of writing complex pages - it's not that they're worse than their non-AJAX equivalents, because equivalents don't (and cannot) exist. Again, that's just something that has to be considered in the design, balancing the cost of server-side calls versus the cost of greater client-side complexity.

    AJAX is cool technology, but implementing it isn't a trivial matter. If you don't know what you're doing, you hit all the problems the original poster is complaining about.

  76. Poor design security will always be a flaw by CFD339 · · Score: 2, Interesting

    I'm in the middle of writing a fairly complex application in which the UI is ajax based. The calls to the back end are all done via these ajax calls.

    At the end of the day, I verify the data I accept from the application before storing it. I don't trust anything coming from the client side. Just because it's ajax and I "think" I'm in control of the application doesn't mean that I am.

    Big deal.

    You still can send me options as selected if the options aren't in the list I offered you -- because I check. You can't send me invalid data because I check it for validity. That's my responsibility.

    You can get me to send you something you don't have access to, because the agents that retrieve the data are running under your authority -- not as a system admin. If you don't have access to them, the data won't exist for you.

    Again -- security happens at the back end. The front end is always to be considered hostile.

    --
    The problem with quotes on the internet, is that nobody bothers to check their veracity. -- Abraham Lincoln
    1. Re:Poor design security will always be a flaw by aproposofwhat · · Score: 1
      Yeah, but I (the black hatted figure in the background) don't care what you do at the server side, because all I'm interested in is harvesting data from the user, and because I've just manipulated the XMLHTTPRequest prototype, all the data is copied to my little logging subsystem on my server.

      The fundamental problem is the insecurity on the client side - your server and application may be unfsckable, but the user is totally pwned.

      --
      One swallow does not a fellatrix make
  77. It's also a force for GOOD by macraig · · Score: 1

    Some of us have been using this "prototype hijacking" technique with HTML filters for years to block and thwart CORPORATE and capitalist abuses of JavaScript. That, in my book, counts as a good use of this technique. Please don't take my Kodachrome away!

  78. Hmm. by mindstrm · · Score: 1

    Don't dismiss this to soon.

    This covers clever javascript methods of abusing the XMLHttpRequest function by effecitvely adding or overloading functions (yes, I know that's not REALLY what happens, but same result), however, it sounds like you still need to inject malicious code somehow in the first place, via XSS or stream injection or site hijacking to make this effective (and in any of those cases, you are already home free)

    I don't fully understand the scope of the re-clonedreplacement XMLHttpRequest, if it is in scope for all subsequent calls to XMLHttpRequest even from parent windows or other non-child windows, then I can see this being very serious, but if not, it's just a clever way to take advantage of XSS.

    I'll have to read this more when I'm awake tomorrow.

  79. Re:Have you ever tried to deploy an AJAX applicati by ralphdaugherty · · Score: 1

    Yet the AJAX implementation, running on an extremely powerful quad-core Opteron system with 8 GB of RAM, couldn't handle as many concurrent clients as our Perl-based CGI system could.

          Very informative posts. The only thing missing was what the various commercial server side products using AJAX were written in. Perhaps you have already added something on that in a later post, or being commercial products, you may not know, but AJAX versus non-AJAX is the point, which I understand.

      rd

  80. Re:Have you ever tried to deploy an AJAX applicati by ralphdaugherty · · Score: 1

    Why is it that you can't seem to be more specific about this "AJAX system?"

          Actually, he referred to eight commercial packages using AJAX, all of which the users rejected.

          That's real life.

      rd

  81. Javascript is not a bad thing... by jamesshuang · · Score: 1

    I think everything that I want to say has probably already been mentioned, but I really need to say this. Javascript is not a bad thing. Sure its design sucks, and the 20 different ways the same code can be interpreted is a real pain in the ass, but it has its uses. Developing interactivity is not a bad thing, and that is exactly what javascript is great at.

    In order to make safe javascript, all you need to do is consider one thing - would my site send and recieve the same data if there was NO javascript? Consider google maps, and the old mapquest. When you drag around the map, the javascript is merely requesting images at a certain coordinate. Even if the user hacks up the javascript to do whatever, the only thing they'll be able request are images at a certain coordinate. Which is exactly what mapquest did when you clicked the edges. If you need to send text data and you use ajax, the javascript can send ANYTHING to ANYWHERE. But should you care? Not if your server actually only accepts proper data with full error checking. Same applied to standard form text boxes. ajax or not, if your server dumps all the data from a POST into a database, your server is good as hosed.

    I play with ajax quite a bit. I love making things interactive. Yeah it's a pain in the ass to work with, especially if you're an ascetic like me, and refuse to use any libraries (I love making my own code, hehe). Locking down the javascript is not one of my concerns though. Sure you need to make good code, if only to make sure it makes sense to yourself. But all server-side handling should be done as if javascript did not exist at all. Server-side code should have only one failure mode - rejection. Client side code can, and WILL fail no matter what. Even slight interpretation issues between the various browsers will muck up the script. You just have to pretend that it doesn't make a difference, and allow the site to be operational still. Follow this, and I don't see how you can actually compromise a site.

  82. Thanks for relating your real world experience. by Anonymous Coward · · Score: 0

    I know from job experience what your talking about, I have found the same types of problems in working with what one could call the 'ajax paradigm.' It's unfortunate that your description of the subtleties of the problems with the ajax paradigm is getting lost in all these hop on the latest web 2.0 bandwagon replies. I think a big reason the ajax paradigm generates all these problems is because it puts too much system functionality in Javascript. Javascript is a very unstable and undeveloped application platform compared to Java, Perl, etc. And on top of that, it's even worse because the ajax paradigm expects Javascript to function as a component in a distributed system, a task that is challenging for even the most developed languages and platforms. The ajax paradigm is like going back to pre internet client-server, but with a much worse programming system. I think one additional reason why there were so many negative responses to your post, is that younger people don't know about all the challenges that client-server systems had to solve over time in the 80's and early 90's. So they know think a very underdeveloped scripting platform can waltz in and work without the years of development done with past client-server systems like foxpro, etc.

  83. Re:Have you ever tried to deploy an AJAX applicati by hobo+sapiens · · Score: 1
    AJAX applications just aren't solid or stable, for the most part. We tried to integrate a number of them into our network here, and frankly each attempt went terribly.
    Do I have to do this? Do I have to tear up your bad anecdotal evidence that AJAX is teh suxx0r?

    C++ applications just aren't solid or stable, for the most part. We tried to integrate a number of them into our network here, and frankly each attempt went terribly.

    .NET applications just aren't solid or stable, for the most part. We tried to integrate a number of them into our network here, and frankly each attempt went terribly.

    Java applications just aren't solid or stable, for the most part. We tried to integrate a number of them into our network here, and frankly each attempt went terribly.

    In all cases, I'd kindly suggest the problem is not with the technology, but with the person doing the work.
    --
    blah blah blah
  84. Re:Have you ever tried to deploy an AJAX applicati by kcbrown · · Score: 3, Insightful

    Are you saying Java apps work poorly?

    Performance-wise, yes. In terms of resource usage, yes. We have deployed a number of commercial groupware systems implemented in Java, as well as several implemented in Perl. We have found the Perl systems to perform far better. We'd take the time to try to figure out why the Java solutions perform so poorly, but it just wouldn't be feasible. The Perl solutions meet our needs more than adequately, so we use them.

    There's a reason Java applications seem to be, on average, slower and more heavyweight than their equivalents in Perl: it seems to encourage complexity.

    The typical Java stacktrace you get when something goes wrong is, in my experience, some 30+ levels deep. That's ridiculously high.

    That means that Java applications are built with class upon class upon class upon class, to a ridiculous degree. The amount of subclassing that happens in a typical Java program is much worse than any other language I've seen, by a factor of 4 or more.

    It's so bad that you have to use a language-aware tool like Eclipse to keep track of it all. Without the ability of such tools to track the class relationships, such programs would literally be impossible to maintain.

    And what does all that extra complexity buy you? Why, nothing at all, actually. The software isn't any easier to develop, debug, or maintain than it would be in any other reasonable language. In fact, I would argue that it's harder to maintain because of the additional complexity.

    The choice to make a program more complex is one that must be made very carefully. Java somehow seems to encourage developers to increase the complexity of their programs. Whether it's because of the language (which includes the class libraries in this case) or the development tools I cannot really say. I suspect it's a combination of both.

    Because of these issues, I've been completely underwhelmed with Java as a development and execution platform. As a language it has some strengths, as all languages do, but I don't find any of those strengths particularly compelling, and find the weaknesses to be very significant.

    Java actually turns out to be a reasonable language to write programs in, but it requires an extreme amount of discipline and you don't get a whole lot in exchange. If I want my programs to be maintainable, I'll write them in Ada or something.

    --
    Use 'slashdot stuff' in the subject line in any email you send me if you want to get past the spam filter.
  85. Re:Have you ever tried to deploy an AJAX applicati by hobo+sapiens · · Score: 1

    Man, am I glad I am not the only one who feels like the whole "use OOP (java) everywhere for everything!" mantra is a bit cargo-cultish. Thank you. I thought there was something wrong with me for a minute.

    --
    blah blah blah
  86. Re:Have you ever tried to deploy an AJAX applicati by ralphdaugherty · · Score: 1

    In all cases, I'd kindly suggest the problem is not with the technology, but with the person doing the work.

          It wasn't *a* person, but rather eight commercial apps using AJAX that didn't work, because users said so, compared to existing non-AJAX web apps that do work.

          Other than that, your earlier examples of use of AJAX were good.

      rd

  87. Mobile phones by tepples · · Score: 1

    This is usually done because the client usually has many processor cycles to spare, while the server doesn't.

    Your clients who use mobile phones aren't going to appreciate your shifting the burden to them.

    1. Re:Mobile phones by douceur · · Score: 1

      That can easily be taken into account for by creating a mobile version of the particular web app. Google has done a great job with the mobile version for Gmail, for instance. The fact of the matter is that what the grandparent stated is true in most cases. Why not make the common case faster when you can still account for the other cases?

  88. Editing JavaScript is very powerful nowadays by michaelhood · · Score: 1

    I use Firebug (Firefox extension, google it) all the time to debug my own JavaScript.

    It lets you review the source, traverse the DOM, etc. and make live changes to the JavaScript/DOM/HTML on the fly.

    You can add code, redefine functions, change variables, etc.

    I hate to encourage this sort of thing, but you'd be surprised at the number of shopping carts and other systems online that rely on the JavaScript code to be "trustable". This, of course, is a horrible methodology. Sadly, it's widespread.

    For example, say someone uses AJAX to call a serverside PHP script that returns the price for a given SKU and stores it in a variable 'p'.

    You skip past all this code and just set p = 0.01 in Firebug. Refresh the page and now your item's price is $0.01. This works in at least 20-30% of all the small-to-medium enterprise AJAX carts I've informally tested it on.

    Having never checked out (that would be theft) with this modified value, it's impossible to say if those same retailers were using proper serverside validation in the checkout process. I'd guess not, given their lackluster approach to AJAX security.

    -mh

    1. Re:Editing JavaScript is very powerful nowadays by theCAS · · Score: 1

      You skip past all this code and just set p = 0.01 in Firebug. Refresh the page and now your item's price is $0.01. This works in at least 20-30% of all the small-to-medium enterprise AJAX carts I've informally tested it on. Having never checked out (that would be theft) with this modified value, it's impossible to say if those same retailers were using proper serverside validation in the checkout process. I'd guess not, given their lackluster approach to AJAX security.
      I don't understand your point. Obviously you can alter a page if you mess with javascript, but every definitive check will always be server-side.

      In the shopping cart example product ids would be saved server-side and prices would be calculated by checking those ids against the db. If the user wants to change the page to show "foobar" instead of the real product name and 0.01 euros instead of the real price is his right but it would not change is order.

      How would you avoid such a "vulnerabily" by the way?
  89. All your bases... by br0k_sams0n · · Score: 1

    Well, there is absolutely, positively nothing AJAX-specific about what this paper describes. Despite it's ignorance about AJAX being a framework, the paper does point out some realistic concerns about XSS. Unfortunately, those same techniques could be used to subvert regular HTTP GET/POST as well as fancy-pants XHRs. There is nothing uniquely AJAX about this save the authors' attempt to capitalize on trendy terms vis-a-vi their consulting firm. BTW, fantastic job description, mind if I use this for my own postings? "Senior Security Engineer of proved experience, works since many years as an IT consultant for private and public companies."

  90. AJAX May Be Considered Harmful by Elranzer · · Score: 1, Funny

    ... only if swallowed.

  91. Re:Have you ever tried to deploy an AJAX applicati by misleb · · Score: 1
    Actually, he referred to eight commercial packages using AJAX, all of which the users rejected.


    Not one by name. Sorry, I but I detect a troll.

    -matthew
    --
    "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
  92. Re:Have you ever tried to deploy an AJAX applicati by misleb · · Score: 1
    You're missing his point, I think. Yes, a request is a request, but where a conventional webapp makes a single request to load the page, some AJAX webapps will make several. It's a sign of badly written apps more than of weakness in the AJAX concept, but a quite a few of them end up replacing one large request-response with many smaller ones.


    Sorry, but there isn't going to be any meaningful discussion here until you decide to be more specific about what "some AJAX webapps" are. I'll admit that I rejected Yahoo's new beta email client because it is slow and cumbersome. In general I am against webapps that try to mimic the desktop experience with massive amounts of javascript running the the browser. But I've also seen AJAX implemented quite well. I've even implemented it myself. There are some really cool things you can do with AJAX that are totally worth it such as auto_complete fields and drag/drop and sorting lists.

    The real problem is that HTML royally blows when it come to building rich UIs. It isn't necessarily AJAX that is the problem, it is all the hacks required to make rich GUIs out of HTML/CSS.

    -matthew

    --
    "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
  93. Re:Have you ever tried to deploy an AJAX applicati by ralphdaugherty · · Score: 1

    All the details were right on, but to be honest with you, they could beta eight web apps without AJAX and find them lacking. If he didn't know what the server sides were written in some of them may just be hyping him about AJAX. And it may not even be the cause of less performance, for example a Java app server could be slower than Perl CGI's as well.

          So yes, he definitely should have provided more server side details.

      rd

  94. Unsafe by __aahlyu4518 · · Score: 1

    I thought that the problem with AJAX was that it consists of readable code on the client side, period.

  95. Re:Have you ever tried to deploy an AJAX applicati by WNight · · Score: 1

    AJAX is a bit slower, per K of HTML, than straight HTML from the server because it receives XML and parses it into changes it makes to the DOM. That's the only technical limitation of AJAX, really.

    If you try to receive 60K of XML and do complicated parsing in the browser, UGH. If instead you receive back 10-50 bytes and render this into important status updates, you save a 50k load and a corresponding wait, with the convenience of having a single action on a single page, so that going back doesn't appear to undo your event.

    If you change *any* UI element, you're probably doing something wrong, standards are good. Your AJAX app shouldn't change how clicking in textboxes works, I agree, but neither should all the local Windows apps that do this. An old company I worked for deployed a phone-status package that exactly fit a 1024x768 page with standard-size windows bar. Any changes in this and it started to look horrible. If we changed the system font size it was almost unreadable. Needless to say, this is just before the otherwise successful company tanked. This was all done windows native, with MFC code. Had my testing team gotten our way the status page would have been HTML and worked static, having AJAX only to provide a live view. The web interface would have been faster and better, even with AJAX.

    It's not the tech, it's how you. If you think not, that proves it's you... Real experts can use dangerous tools sparingly and safely.

  96. Re:Have you ever tried to deploy an AJAX applicati by WNight · · Score: 1

    Write in whatever style results in the easiest to understand code that works. If you're modeling physical things, OOP is often that paradigm, but you can do OOP in C - it's a philosophy as well, not just a technology. If you find it's a pain to make something fit OOP, maybe you examine it and it's not an analog of a thing but a non-concrete idea like security, perhaps it just isn't amenable to this abstraction.

    Similarly, your object model should represent your data, not your programming hurdles. If you have five levels of class hierarchy for a Table, you're probably over-using inheritance.

    Short understandable code - the "right way" is whatever the fastest way to achieve this is.

  97. Re:Have you ever tried to deploy an AJAX applicati by Alioth · · Score: 1

    I wouldn't say that AJAX encourages poor development.

    However, AJAX itself is abysmal. It's "graunching" a web browser and server to do something it fundamentally wasn't designed to do. Drawing a GUI by writing HTML fragments on a browser window? With a protocol which is stateless, designed for serving documents? Ye gods! Java applets are a MUCH better way to get AJAX-like things done, yet we've abandoned that and decided to go with this ... hack.

  98. Re:Have you ever tried to deploy an AJAX applicati by sethawoolley · · Score: 1

    About gmail and google maps...

    Mutt beats gmail hands down. the l button and the regular expression support in mutt rules anything google has.

    Google maps is the only AJAX app that's worth anything, and it wasn't written by google, it was written by some freelancers who sold the concept to google based off of a mapping drill down server somebody else wrote.

    And every other map vendor now has "draggable" maps anyways, so it's not that big of a deal. It's not even that important, either. The routing and geocoding library aren't even written by google --- its speed is almost wholly a function of the algorithms that that another company ( ;) ) developed and sells to them with a per-use license that I'm not free to name the terms of.

    AJAX can be ok, but it's not fast, and it's not easy on servers. Google had to put up massive hardware to make it scalable.

  99. AJAX may be considered harmeful by bugs+longa · · Score: 1

    > Anyone know where I can find a non-PDF version of this paper?

    Yes, but you'll need AJAX to read it.

    --
    Bugs longa, ars brevis
  100. No Brainer..... by IHC+Navistar · · Score: 1

    I've known that Ajax was harmful since I was 1. Ever since then, I stopped eating things that I found under the sink.....

    ( bad pun )

    --
    Knowing Google's lust for data collection, the Soviet Union is still alive and well inside the psyche of Sergey Brin....
  101. Re:Have you ever tried to deploy an AJAX applicati by Pieroxy · · Score: 1

    You are missing the biggest part. As with every other application or framework, the AJAX ones are released when barely mature. With any other application it 'kinda works' because they rely on a stable base (a JVM, an OS, W3C standards, etc...)

    AJAX applications rely on a fragmented unstable and constantly moving base. And no, it is not JavaScript, it is the various DOM implementations and javascript limitations inherent to every different browser. I have written an AJAX framework, and know the pain and the hacks needed to make such a framework usable. The problem is that any browser vendor may chose to disable this CSS feature or this javascript one, or this DOM hack because all of a sudden a whacko has found a way to make it a security vulnerability.

    Again, the problem is not with JavaScript or with AJAX, it's with the fragmented unstable base of JavaScript's implementations in web browsers and the 'extra features' the AJAX vendors think they need to make their product competitive (when listing features against a competitor).

  102. Warning from Product Label: by nwmann · · Score: 0

    Eye irritant. In case of eye contact, flush with water. To avoid harmful fumes, do not mix with ammonia or other cleaning products. Keep out of reach of children.

  103. Re:Have you ever tried to deploy an AJAX applicati by julesh · · Score: 2, Informative

    2. The Back button goes to the last page, as opposed to the last action, which is a good thing for true Web applications, since the Back button usually causes tons of problems (Ever seen "DON'T PRESS THE BACK BUTTON OR YOU COULD ACCIDENTALLY PAY FOR THIS PRODUCT TWICE"?).

    The Post-and-Redirect design pattern (or the use of unique once-only form ids) solves this problem in almost all cases. Only badly written web apps still suffer from it.

    The rest of your points are good, though.

  104. Re:Have you ever tried to deploy an AJAX applicati by julesh · · Score: 2, Insightful

    It's just a JavaScript library that allows the page to communicate with the server without clicking a link and bringing up a new page. How does that encourage poor development?

    I'll take a stab at this. The problem is that it encourages people to write substantially more complex front-end code in javascript than was ever attempted prior to the development of AJAX. And front-end javascript is notoriously difficult to do right: there are a lot of browser incompatibilities that need workarounds, and many things that should be common in an application are actually very difficult to achieve, primarily because Javascript wasn't designed for this purpose -- its design goal was to allow small page modifications to be performed at the client, not to allow people to produce complete user interfaces. The fact that it is restricted to a single thread of execution and doesn't have a wait-for-event primitive makes some complex designs very hard to implement. Its handling of common user interface elements is basic and often difficult to work with.

    All of these factors combine to make AJAX development substantially harder than equivalent development in more friendly environments (e.g. Java app development, native Windows, Linux or MacOS app development, etc.).

  105. Interesting point - going to be up to browsers to. by CFD339 · · Score: 1

    ..fix the hole in that. Meantime, I'll need to avoid putting state secrets or credit card information on ajax based forms.

    --
    The problem with quotes on the internet, is that nobody bothers to check their veracity. -- Abraham Lincoln
  106. Re:Have you ever tried to deploy an AJAX applicati by Anonymous Coward · · Score: 0

    He can't be more specific. The fact of the matter is that virtually every AJAX app is poorly written. The most specific you can get is every AJAX application you can think of: GMail, Yahoo! Mail, Hotmail, any of the AJAX-based CMS systems, Digg, any of the AJAX-based groupware systems, any other AJAX-based Webmail system, any AJAX-based forum systems, etc. They all exhibit numerous problems due to their use of AJAX.

  107. Re:Have you ever tried to deploy an AJAX applicati by Anonymous Coward · · Score: 0

    Off-hand, I recall one of the CMS systems using Ruby on the server-side, and the other two used Python.

    The webmail system used some server software provided to us as a native binary, running as its own HTTP server. I presume it was written in C, C++ or some other language that is compiled natively. We didn't have access to the source code.

    One of the groupware systems used PHP, and the other used Java.

    For the forum software, one used Ruby, one used Java, and one used PHP.

  108. Re:Have you ever tried to deploy an AJAX applicati by Anonymous Coward · · Score: 0

    Fag.

  109. Re:Have you ever tried to deploy an AJAX applicati by arevos · · Score: 1

    The problem is that it encourages people to write substantially more complex front-end code in javascript than was ever attempted prior to the development of AJAX. And front-end javascript is notoriously difficult to do right: there are a lot of browser incompatibilities that need workarounds

    That seems more an argument in favour of fixing the incompatibilities between browsers, rather than against the use of more complex Javascript.

    and many things that should be common in an application are actually very difficult to achieve, primarily because Javascript wasn't designed for this purpose -- its design goal was to allow small page modifications to be performed at the client, not to allow people to produce complete user interfaces.

    Javascript is a fairly generic Turing-complete language, and I can't see feature of the language itself that would make creating a user interface particularly difficult. Indeed, the entire Firefox UI is essentially XUL and Javascript. It seems to me that the source of any problems with Javascript would be inadequate (and incompatible) libraries, rather than the language itself.

    The fact that it is restricted to a single thread of execution and doesn't have a wait-for-event primitive makes some complex designs very hard to implement.

    A wait-for-event primitive? What do you mean? Javascript allows one to create callback functions to a number of user-triggered events, and one can also easily trigger functions on custom events. Though the single threading is an issue, I'll grant.

    Its handling of common user interface elements is basic and often difficult to work with.

    Again, it would appear you're more criticising the libraries, rather than the language.

  110. This is Slashdot by Anonymous Coward · · Score: 0

    Although you're posting as AC, I think this is worth saying, as your post was useful:

    This is Slashdot, which nowadays is inhabited 99.9% by inept, illiterate, inarticulate, illogical and incompetent morons with an attention span exceeded by that of gnats. Their reading ability terminates immediately on encountering any sentence longer than 7 words, any phrase containing more than one adjective, and any word with more than two syllables. And the concept of statement attribution in composite articles is of course utterly meaningless to them.

    There's no point getting annoyed at all this, just ignore them like you ignore the slime molds covering the ground outside.

    Those of us not afflicted by the above are still here mainly for amusement value.

    PS. In case you're new, it wasn't always like this. In the early days, most people here were very logical techs.

  111. Why even use AJAX then? by Anonymous Coward · · Score: 0

    The main benefit that is often claimed of AJAX is that you don't have to generate entire pages over and over again. You just modify a portion of the current page. Unfortunately, that prevents bookmarking of pages.

    So we point out that pretty major flaw that is inherent with the AJAX way of doing things. And here you come, telling us to cut down on the number of AJAX requests, basically to the point of sending an entire page for each action.

    This is why many of us think that AJAX is nonsense. When it is used as intended, it suffers from serious performance problems. And then the solution AJAX advocates give is to revert to what we were doing before!

    Don't waste our time by telling us you have some fantastic technique that offers numerous benefits over what we're currently doing, only to find that your technique fails to perform adequately, and then you suggest that we just revert to what we have been doing for a decade.

    1. Re:Why even use AJAX then? by Anonymous Coward · · Score: 0

      There is a technique which allows the user to bookmark every step without loading a new page every time. There's no point arguing with you about this though. If you don't get AJAX, keep doing what you are good at and serve customers who don't get AJAX either.

    2. Re:Why even use AJAX then? by hobo+sapiens · · Score: 1

      *sigh*

      you clearly don't get the fact that not everything needs to be bookmarked. You also don't see how you can use AJAX to make the client take some load off the server and network.

      As another reply to your message already stated, there is no sense arguing with you about this. If you don't like a particular technique, then don't use it. Just don't pontificate about the evils of a technology you obviously have no grasp on. I am done with you now. Bye.

      --
      blah blah blah
  112. Re:Have you ever tried to deploy an AJAX applicati by Anonymous Coward · · Score: 0

    And I doubt "highly talented developers" would design a system that uses multiple Ajax requests to generate a page and then blame the resultant server slowdown on Ajax.

    AJAX advocates tell us that the main benefit of AJAX is that we don't have to generate a complete page for every request from a user. We are encouraged to generate the page dynamically on the client-side in small chunks, via AJAX requests. And when we do so, we run into severe performance problems.

    So then you AJAX advocates turn around and tell us to reduce the number of AJAX requests we perform. To get decent performance, we end up having to generate a complete page for each client request. Thus we end up with a situation where we don't get any of the benefits of AJAX, as we're still generating complete pages for each client request, but we have to deal with its added complexity.

    That doesn't fly in the real world, bub. We don't have the time, money and resources to waste on your pathetic claims.

  113. Re:Have you ever tried to deploy an AJAX applicati by Zarel · · Score: 1
    AJAX advocates tell us that the main benefit of AJAX is that we don't have to generate a complete page for every request from a user. We are encouraged to generate the page dynamically on the client-side in small chunks, via AJAX requests. And when we do so, we run into severe performance problems.

    So then you AJAX advocates turn around and tell us to reduce the number of AJAX requests we perform. To get decent performance, we end up having to generate a complete page for each client request. Thus we end up with a situation where we don't get any of the benefits of AJAX, as we're still generating complete pages for each client request, but we have to deal with its added complexity.
    You're missing the point. You generate a complete page, minus the part that doesn't change between pages. (Which, for most actions, is the majority of the page).
    --
    Want a high quality FOSS RTS game? Try Warzone 2100!
  114. Re:Have you ever tried to deploy an AJAX applicati by radtea · · Score: 1

    Ajax, by itself, can't possibly cause any of the problems you describe.

    The point is that AJAX makes it easy to do things badly, in the same way that Java makes it easy to do things slowly and Perl makes it easy to do things incomprehensibly.

    As with any new language, it takes time to develop and institutionalize the idioms that work around the inherent problems, and because AJAX is flavour-of-the-month that hasn't happened yet. Thus, the OP's experience with badly written AJAX apps. They are the result of some marketing droid saying, "Hey, code me up some AJAX--it's what customers are beggging for!" and ever-optimistic technologists saying, "This stuff is bleeding-edge kewel, we'd love to!" and then doing a crappy job of it because the idioms for doing it well aren't yet well known and the gotchas are still being discovered.

    So you're right that there is nothing "inherent" about AJAX that makes it necessary that AJAX apps will be crap, but there is something inherent about where we are on the AJAX learning curve and adoption cycle that makes it an absolute certainty that most AJAX apps will be badly-written unscalable pieces of garbage. And AJAX apps from large third-party vendors with big marketing budgets that are purchased by PHBs with an eye to nothing more than buzzword compliance will the worst hit. In-house service apps like Google's offerings will in general be much better because the people who write them also have to live with them.

    The unfortuante side effect of this is that the technology itself will get a bad rep, and people will avoid it until it is revivified under a new name.

    --
    Blasphemy is a human right. Blasphemophobia kills.
  115. irrelevant by oohshiny · · Score: 1

    If you have XSS vulnerabilities, you're screwed. That's just a fact, and it's unrelated to prototypes or AJAX. And XSS won't get fixed by changing prototypes or by not using AJAX.

    In different words, the paper is irrelevant and stupid.

  116. How would you know? (No disrepect intended) by Anonymous Coward · · Score: 0

    "I haven't come across any of the problems you've mentioned."

    How would you know, whether or not you (actually your client) have "had problems", if the purpose of an "evil attack" using the XSS attack were merely to document your browser's behavior so that its behavior could be "registered/monitored" and then used as input for another Type 2 XSS attack on another of perhaps "problematically coded" one among many "non-problematically coded" AJAK applications running on a specific client's browser? If I read the article correctly, the implication is that a malicious attack could use the potential of a XSS Type1-Type 2 attack on one AJAK application to eventually, if intelligently done (ie in the correct and sufficiently stealthy order), comprise any or all other AJAK applications given sufficient time without the user's or the AJAK application's knowledge or intention.

    From my reading of the article, it seems to me that it is precisely these kinds of "deep threats" that the article draws attention to in dicussing the underlying the vulnerabilities of all AJAX methods. Ultimately don't AJAX approaches rely on assuming that all other AJAX apps are well-behaved so that the scripting behavior of a particular client browser machinery has not already been penetrated/compromised and is behaving "honestly"?

    I ask this as a java-developer interested in incorporating AJAX methods so that the well-known "time penalties" of many Java web apps can be avoided. While I want to use Java to control application logic I thought I might be able to use AJAK to avoid the time penalties. However, if I must reduce security to gain speed am I not better served by going to the Sun Webstart approach for my apps and not to AJAK? I am in particular interested in incorporating Google Maps AJAK scripts into my apps so that I don't have to reinvent the wheel (especially since my version would almost certainly be a poor man's version of the Cadilac that Goggle has already created). Yet know I wonder if the maps Google is sending me can not be used to encrypt malicious data because my client's (both senses) browsers have been compromised by other AJAK apps.

    I don't see from your post that you have addressed the central concern raised in the article that even "well written/well behaved" AJAK apps are not at risk here? What is it about Javascript Libraries that would lead you to believe that this is a non problem? As noted by Wikipedia Google itself has been vulnerable to such attacks (see XSS). If my reading of the article is correct, it is that "Effective" and "well-behaved" are not always synonymous. While I would like to agree with you, my reading of the article suggests that there is good reason to doubt your confidence in Javascript Libraries

  117. It's clearly not an ad hominem attack. by Anonymous Coward · · Score: 0

    It's not an ad hominem attack to point out that a particular individual does not have the background and experience to be discussing a particular topic.

    The grandfather poster is right: a 16-year-old kid probably does not have the experience necessary to make decisions about deploying a large application into a corporate environment. That's not to say the kid is stupid, or will never obtain such experience.

    I wouldn't take legal advice from a 16-year-old. I wouldn't take medical advice from a 16-year-old. Maybe I would accept such advice when those 16-year-olds grew up, graduated from university, graduated from medical or law school, and then practiced in their chosen fields for several years.

    Likewise, I wouldn't take advice on how to run my corporate network from some random 16-year-old kid on the Internet, of all places. I especially wouldn't take his advice when I know from actual experience that what he is saying is incorrect. The technologies he advocates do not work as he says they do, even if he believes with all his might that they do.

    The fact is that the kid is inexperienced in this area, and the technology he advocates does not perform as he thinks it does. It's not an ad hominem attack to point out his inexperience and incorrectness, as they are both 100% factual and correct.

    1. Re:It's clearly not an ad hominem attack. by Zarel · · Score: 1

      It's not an ad hominem attack to point out that a particular individual does not have the background and experience to be discussing a particular topic.
      [...]
      The fact is that the kid is inexperienced in this area, and the technology he advocates does not perform as he thinks it does. It's not an ad hominem attack to point out his inexperience and incorrectness, as they are both 100% factual and correct. I am, in fact, quite experienced in this area. Ajax is a fairly new technology, and because of that, age doesn't play that big of a role in experience with it.

      And I have yet to hear a single person give me an example of how I am incorrect. I've heard plenty of people say "Oh, I know you're wrong... but I'm not going to tell you why." Sometimes, they go further, and say, "I've had a few bad experiences with a few Ajax apps, which clearly means that all Ajax apps are bad, never mind all the ones that aren't such as Google Maps or the fact that Ajax can't possibly cause any of the problems I describe unless it's used incorrectly. I'm EXPERIENCED, I can't possibly use it incorrectly!"

      So, please. Drop the elitist attitude and tell me exactly why Ajax is bad.
      --
      Want a high quality FOSS RTS game? Try Warzone 2100!
    2. Re:It's clearly not an ad hominem attack. by Zarel · · Score: 2, Insightful

      The problem is that you're not listening. Go read my original post. Eight commercial AJAX products failed us. We actually tried them. We put them to use. We even got the vendor's assistance in once case. Yet these products failed. I clearly outline exactly how they fail in my original post: performance problems, usability problems, consistency problems, and so forth. It is quite statistically possible that you were unlucky in that all eight commercial vendors you found were incompetent. Factor in the fact that Ajax is the new buzzword, so most of the vendors advertising Ajax are probably not as competent as you would like.

      I have also given plenty of evidence that those companies don't know what they're doing: They've somehow managed to make an Ajax application many times slower for the client and server, as well as take up much more bandwidth, the exact opposite of what Ajax is meant to do.

      AJAX doesn't cut it for real-world deployments, kid. I know, you probably won't believe me. After all, I've only directly experienced the problems AJAX presents. I've only attempted to deploy eight AJAX applications, only to see all eight fail horribly. I can understand your frustration. But, please, try Ajax sometime in the future, after it's no longer Buzzword of the Week and you can find people who actually know how to use it properly, and you might find that it's a lot better than what you thought.

      I'm not talking about your experience with AJAX. Think bigger, kid. I'm talking about your lack of experience doing large-scale enterprise deployments. We're not throwing together some site for your high school that'll get 250 hits per month.

      What we're talking about here is even towards the low end of the spectrum. The AJAX applications we attempted to use were only being used by about 8000 people spread throughout our offices in the northeastern US. You won't understand a deployment even of this small size until you've actually done it one or twice, kid. I've written Web sites that take advantage of Ajax that were used by a lot more than 8000 people. Believe me, I know how to use it in ways that actually save bandwidth and server processor cycles.
      --
      Want a high quality FOSS RTS game? Try Warzone 2100!
  118. Re:Have you ever tried to deploy an AJAX applicati by Anonymous Coward · · Score: 0

    You're missing the point. You generate a complete page, minus the part that doesn't change between pages. (Which, for most actions, is the majority of the page).

    No, you're missing the point. For many applications, the overhead associated with generating and executing the JavaScript to perform the requests to fill in the missing parts of the page can often exceed that of just sending the complete page in the first place.

    Not only that, but the use of AJAX adds additional complexity which must be tested. I know you've never worked on any large-scale corporate intranet project before, so I understand that you're not aware of how costly such testing can be, especially when there are so few benefits from using the technology.

    When we sit down and run the numbers, AJAX just isn't feasible. The savings you claim either do not exist, or are actually negative (ie. the AJAX solution uses more bandwidth, client and server CPU time, etc.)! And that's ignoring all of the other problems, such as the inability to bookmark pages, non-standard textfield behavior, an inability to use multiple browser tabs, and so forth.

    Sorry, AJAX just doesn't cut it for real-world development.

  119. I Hope It's True by Anonymous Coward · · Score: 0

    I hope it's true. I am so tired of client side. Lamers.

  120. Re:Have you ever tried to deploy an AJAX applicati by Zarel · · Score: 1

    The Post-and-Redirect design pattern (or the use of unique once-only form ids) solves this problem in almost all cases. Only badly written web apps still suffer from it.
     
    The rest of your points are good, though. I was giving an example. The "form id" solution still gives the annoying "Content has Expired" message in IE and the "Are you sure you want to resend form information" dialog in Firefox. The "Post-and-Redirect" method breaks the back button even worse, unless you try to press Back several times really quickly or use the Back menu, in which case it suffers from the same problem as I mentioned earlier. Although both solve the problem I mentioned, Ajax is still better for it (as long as you have a fallback for public sites).
    --
    Want a high quality FOSS RTS game? Try Warzone 2100!
  121. Yes by Anonymous Coward · · Score: 0

    All of these complaints could easily be applied to Windows 3.0, as well. It's not the type of technology that's bad (Ajax isn't a specific technology, but rather a class of technology, like "windowed system"), but simply the implementation of it. If 5 of 5 Ajax apps you tried are bad, well, that's not surprising since it's a relatively new field with a really low barrier to entry and lots of money. Why would one expect anything else from the first round?

    It is possible to do Ajax right. Compare Google Maps to any non-Ajax map site, for example. There probably isn't a good Ajax CMS yet, but that's because all the Ajax CMS vendors suck, or all the good Ajax programmers haven't done CMS yet, not because it's fundamentally impossible.

    Factors like usability, performance, and quality can be designed for. People have gradually figured out how to engineer desktop apps for these attributes in the past 20 years. They just haven't figured out (most of them) how to do this for Ajax apps yet.

    I've recently starting writing Ajax apps (after doing desktop apps for many years). Yes, the tools aren't what you'd call "good", but they're far better than some tools I've had to use over the years. If you can't figure out how to "structure" a client-server app, I do not consider you a "competent software developer", and I look forward to eating your market share for lunch.

    Cheers!

  122. Re:Have you ever tried to deploy an AJAX applicati by Anonymous Coward · · Score: 0

    But surely you can understand where all the confusion (and hostility) is coming from surrounding all your posts.

    I don't see hostility. I do see some stupidity and ignorance, namely from that tyke who insists that AJAX is so great, even after it has been shown empirically (eight times over!) that even commercial applications are not suitable. Then again, I don't care, because I have such strong evidence and experience to show they are wrong. Unlike them, we have tried to deploy these AJAX applications, and they failed horribly in so many respects.

    You seem to be referring to AJAX as some sort of encompassing language and application framework on both client and server.

    I've clearly been talking about AJAX web applications. This involves both the code that is employed on the server-side and the client-side. But the problems we were running into were all over the place. Again, it didn't matter which language or platform the server-side portion of the applications we tried was written in. The products we tried included native binaries, PHP scripts, Ruby scripts and Python scripts. The end result was that the performance was unacceptable. Our Perl-based system ran better on PC hardware a decade old, when compared to the new AJAX-based systems running on a goddamn quad-core Opteron with 8 GB of RAM!

    Of course, the client-side problems were numerous, as well. See my original post for more details.

    It's useless to talk of AJAX without considering its applications. How AJAX should theoretically work is fucking useless. When it comes to real-world usage, it fails to provide a usable system.

  123. Luckily for me by Salsaman · · Score: 1
    a possible Web Worm that lives in the very fabric of Web 2.0 and could kill the Web as we know it.

    Luckily for me, I am still on Web 1.0...

  124. Re:Have you ever tried to deploy an AJAX applicati by Zarel · · Score: 1

    For many applications, the overhead associated with generating and executing the JavaScript to perform the requests to fill in the missing parts of the page can often exceed that of just sending the complete page in the first place. Generating? Why would you generate the JavaScript in Ajax? The JavaScript makes a request to the server, the server sends back XML, the JavaScript parses the XML and renders it. How could that possibly take any longer than the browser making a request to the server, the server sending back HTML, and the browser rendering it?

    When we sit down and run the numbers, AJAX just isn't feasible. The savings you claim either do not exist, or are actually negative (ie. the AJAX solution uses more bandwidth, client and server CPU time, etc.)! Those problems couldn't possibly be caused by Ajax, and suggest a fairly high level of incompetence of whoever wrote the new Ajax solution (not unlikely, as another poster mentions).

    And that's ignoring all of the other problems, such as the inability to bookmark pages, non-standard textfield behavior, an inability to use multiple browser tabs, and so forth. Traditional web applications suffer from an inability to bookmark pages as well - try submitting a method="post" form and bookmarking the resulting page. I've already told you that non-standard textfield behavior could not possibly be caused by Ajax (which is nothing but a JavaScript library that lets a Web page communicate with a server), and is actually caused by bad JavaScript programming. An inability to use multiple browser tabs also could not possibly be caused by Ajax, and is actually caused by certain methods of storing session information - many non-Ajax applications suffer from the same flaw.
    --
    Want a high quality FOSS RTS game? Try Warzone 2100!
  125. Why AJAX is so slow by Anonymous Coward · · Score: 0

    The Javascript engines in Mozilla and IE are not that bad speed-wise. The killer slowdown is the poorly implemented DOM bindings in these browsers. God help you if you have to create or manipulate thousands of DOM elements in AJAX - it can take a minute of client CPU time.

    Brendan Eich's roadmap talks about this topic in his blog:
    So the goals for Mozilla 2 are:

            * Clean up our APIs to be fewer, better, and "on the outside."
            * Simplify the Mozilla codebase to make it smaller, faster, and easier to approach and maintain.
            * Take advantage of standard language features and fast paths instead of XPCOM and ad hoc code.
            * Optimization including JIT compilation for JS2 with very fast DOM access and low memory costs.
            * Tool-time and runtime enforcement of important safety properties.

  126. Cruft? by maestro371 · · Score: 0

    Cruft? An injection mechanism being available is an "unpleasant substance"? Perhaps you mean "crux"? This is Slashdot, so I suppose it's anyone's guess.

  127. Wrong! by Anonymous Coward · · Score: 0

    Web applications are "always on" applications.. Something you can not do with even a laptop. With the knowledge of a URL, a username and password, you can access a service from anywhere on the planet, with as little as a cell phone.

    Wrong. You need Internet access, which is not available everywhere, even with a cell phone. Many cell phones have sub-bar browsers that do not work well with many sites, even those offering some degree of support for such phones.

    You don't have versioning nightmares.

    Wrong. Many web applications depend on a certain version of a browser being present. Many will bail if a non-standard browser, even one as popular as Firefox, is used.

    You don't have installation headaches.

    Wrong. You still need to install a Web browser. Many web applications require plugins like Flash or a Java plugin to be installed. These are often not supported on some platforms (PPC Linux, for instance). Even on i386 Linux, it can be a major hassle to get those plugins working.

    You don't have platform lock-in.

    Wrong. Many AJAX web apps will only work with a small subset of the browsers out there, which in some cases means only IE 6 and IE 7. Many non-AJAX apps still use JavaScript code that uses proprietary extensions, thus only running on certain browsers.

    You don't have OS restrictions.

    Wrong. Web apps that involve Java applets or Flash will often not work on non-Windows platforms. See the points above.

    You don't have performance / hardware requirements.

    Wrong. Try running Firefox on even a 300 MHz system with 512 MB of RAM. It's not pretty. It's fucking awful, to be honest. Opera is somewhat better. AJAX on a cell phone is just terrible. It's far too much processing to do on the client side, especially when the client side is short on resources.

    You don't have EULA's because..
              You don't have copyright infringement
              You don't have software co-mingling concerns


    Wrong. Wrong. Wrong. You agreed to an agreement with Google when you signed up for GMail. The same for Hotmail, Yahoo! Mail, Digg, Slashdot, YouTube, and virtually every other site out there.

    You don't have tons of test platforms during development time.

    Wrong. You have to test a wide array of web browsers, and different version of those browsers. Netscape Navigator 4.x, Netscape Navigator 6.x, Netscape Navigator 7.x, Netscape Navigator 8.x, IE 5, IE 6, IE 7, Opera 6.x, Opera 7.x, Opera 8.x, Opera 9.x, Mozilla Firefox 0.9x, Mozilla Firefox 1.0.x, Mozilla Firefox 1.1.x, Mozilla Firefox 2.x, Mozilla Seamonkey 1.0.x, Mozilla Seamonkey 1.1.x, Safari 0.x, Safari 1.x, Safari 2.x, etc., etc.

    You don't have technical support calls out the ass (assuming your site has a standard user interface).

    Right. But that's only because your service is so poor that anyone who would actually go to the trouble of making a tech support call isn't using your service.

    You have intrinsically collaborative software.

    Wrong. Special care must be taken to make sure that web software is not abused. It actually takes more care and concern to make sure an application is collaborative only to the extent that is wanted, so that it isn't easily exploited (eg. for sending spam).

    You don't have hard-drive crashing concerns / backup concerns.

    Wrong. It's always important to back up critical data, even when a company like Google, Yahoo! or Microsoft is hosting your data. It doesn't matter if it's their hard drive dying or yours. The end result is that your data can easily become lost.

  128. Troll. by Anonymous Coward · · Score: 0

    If you're willing to stand behind that assessment with an actual login, I wouldn't be calling you out as an AC troll.

    This has all the hallmarks of either a troll post (not a single actual product mentioned that can be critiqued), or a poor technology implementation (I'm sorry but CMS and mail systems are not exactly where the sharpest programmers tend to live).

    All the problems you cite sound like poor programming. You want to see a good web app that uses AJAX? Try Gmail or Google Maps, you may have heard of them. I don't see anyone complaining about those apps screwing with text fields or the back button!!

    FUD!

  129. Re:Have you ever tried to deploy an AJAX applicati by IAmGarethAdams · · Score: 1

    By Post-and-Redirect, GP meant at an HTTP level, rather than a Javascript/"HTML META" level. Using the correct standard and doing it with HTTP does NOT break the back button. And I think, although I'm not sure, that the unique ID was supposed to suggest something within the application, in which case displaying "You have already submitted this payment" is trivial.

  130. Re:Have you ever tried to deploy an AJAX applicati by julesh · · Score: 1

    That seems more an argument in favour of fixing the incompatibilities between browsers, rather than against the use of more complex Javascript.

    In an ideal world, sure. Realistically, this isn't something I'm holding my breath for. MS have practically zero interest in interoperability with other browsers. Mozilla devs are only interested as far as it improves conformance to W3C recomendations (which MS routinely ignore). For stuff outside of standards, Mozilla has virtually no interest. Sticking to standards isn't viable when MS browsers don't work when you follow them.

    Javascript is a fairly generic Turing-complete language, and I can't see feature of the language itself that would make creating a user interface particularly difficult. Indeed, the entire Firefox UI is essentially XUL and Javascript.

    Yes, but XUL isn't available in a web context, where one must generally support a wider variety of browsers than just mozilla, with your own XUL packages installed locally. We're talking about AJAX apps here, not XUL development which is a completely different game with different rules.

    The problem is in developing UIs that operating through the HTML DOM, not anything intrinsic to Javascript as a language. It's a library issue, not a compiler one, to compare it using the terms of desktop programming.

    A wait-for-event primitive? What do you mean? Javascript allows one to create callback functions to a number of user-triggered events, and one can also easily trigger functions on custom events. Though the single threading is an issue, I'll grant.

    When programming UIs in other environments, it is generally possible to call a function of some kind that displays a UI and waits for user response. JS has a limited version of this in the window.alert(), window.prompt() and window.confirm() methods. Other environments tend to allow the programmer rather more control over the format and behaviour of the dialog box that is shown (e.g. using the Win32 ExecuteDialog() API, or some object-oriented equivalent). Compare the following snippets:

    //Standard JS
    function button1_onclick() {
    dlg=new mydialogbox();
    dlg.okhandler=button1_onclick_dlgok;
    dlg.cancelhandler=button1_onclick_dlgcancel;
    dlg.show();
    }
    function button1_onclick_dlgok() { //do stuff
    }
    function button1_onclick_dlgcancel() { //clean up without doing stuff
    }


    or

    //Some environment that does what I was talking about
    function button1_onclick() {
        if (new mydialogbox().execute() == 1) { // do stuff
        }
        else
        { // clean up without doing stuff
        }
    }


    The flow of control in the latter example is substantially easier to understand, but it is impossible to structure your code like this in the javascript environment, because there's no "wait for event/dispatch event" API available (which is how the 'execute' method in the latter example would work).

    Again, it would appear you're more criticising the libraries, rather than the language.

    Yes, I am. However in the context we're talking about (AJAX programming) you're stuck with the libraries you're given, so they become (at some level) one and the same thing. Yes, I'm aware of what javascript can do in different environments; I'm even considering using it as an extension language in my own apps. But that doesn't change the fact that writing advanced user interfaces using javascript in web browsers is more difficult than it should be.

  131. Re:Have you ever tried to deploy an AJAX applicati by arevos · · Score: 1

    The flow of control in the latter example is substantially easier to understand, but it is impossible to structure your code like this in the javascript environment, because there's no "wait for event/dispatch event" API available (which is how the 'execute' method in the latter example would work). Your javascript code was far more verbose than it needed to be. You could have written it like this instead:

    new mydialogbox().execute({
      success: function() { /* do stuff */ },
      failure: function() { /* clean up without doing stuff */ }
    });
    Or even like this:

    new mydialogbox().execute(function(success) {
      if (success) { // do stuff
      }
      else { // clean up without doing stuff
      }
    );
    And it seems to me that the latter example isn't so different to your hypothetical blocking function. It just has an extra layer of indentation.

    Yes, I am. However in the context we're talking about (AJAX programming) you're stuck with the libraries you're given, so they become (at some level) one and the same thing. Yes, I'm aware of what javascript can do in different environments; I'm even considering using it as an extension language in my own apps. But that doesn't change the fact that writing advanced user interfaces using javascript in web browsers is more difficult than it should be. Fair enough. I tend to distinguish between languages and their libraries, because frequently one can have a problem with one, and not the other. Javascript's main weakness is its libraries, whilst for, say, Java, the main weakness is the syntax and grammar of the language.
  132. Re:Have you ever tried to deploy an AJAX applicati by IAmTheDave · · Score: 1
    Bullshit again.

    Damn right. AJAX = protocol to communicate with the server.

    The client-side complaining is hardly a problem with AJAX. Calling and getting information from the server is easy and quick. It's the DOM scripting that is then used to display the information that comes back from the server that causes CPU spikes and client-experience breakdowns.

    Further, a block of text fading in and out on a page is not AJAX. For the love of God, it's DOM scripting via Javascript, and in no way AJAX at all. Perhaps AJAX was used to get the text to display, but putting said text in a div or whatever and then FADING it in to be cool is not AJAX at all.

    --
    Excuse my speling.
    Making The Bar Project
  133. Link still dead 4 days later. by Skapare · · Score: 1

    It's Wednesday. The link to the PDF is still dead (connection refused). Maybe this article should be titled "Slashdot may be considered harmful (to weak web servers)".

    --
    now we need to go OSS in diesel cars
    1. Re:Link still dead 4 days later. by Anonymous Coward · · Score: 0

      Now the link works but the file is not found. Anyone have a better link to this Subverting AJAX paper?