JavaScrip, xml and Linux

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jean Pion

    JavaScrip, xml and Linux

    Dear readers,

    Can I use the following object on a Linux based web server:

    var xmlDoc = new ActiveXObject(" Microsoft.XMLDO M");

    If not, is there a compatible object?

    Tia, Jean.


  • Jean Pion

    #2
    Re: JavaScrip, xml

    Dear readers,

    Okay, that was a bit stupid because the object is - ofcourse - created by
    the browser...
    Now the real trouble is the following code:

    var xmlDoc = new ActiveXObject(" Microsoft.XMLDO M");
    xmlDoc.async = "false";
    xmlDoc.load(http://111.222.333.444/btw/Btw2Xml.jsp?parm=NYC);

    If I have a local file, I can do the load... ( the url shown is a fake one)

    If I put very same file on my webserver, I get a an "access error" in IE on
    the 3rd line show, character 7.
    This is the 'dot' in "xmlDoc.loa d". If I use the script debugger it says:
    "msxml3.dll : access denied".

    Which is very informative, but not a great help.
    Does anyone have a clue?

    Tia, Jean.

    "Jean Pion" <jean_pion@hotm ail.com> schreef in bericht
    news:ab1c4$41c7 dd3f$513a1b62$2 8135@news1.zonn et.nl...[color=blue]
    > Dear readers,
    >
    > Can I use the following object on a Linux based web server:
    >
    > var xmlDoc = new ActiveXObject(" Microsoft.XMLDO M");
    >
    > If not, is there a compatible object?
    >
    > Tia, Jean.
    >
    >[/color]


    Comment

    • Martin Honnen

      #3
      Re: JavaScrip, xml



      Jean Pion wrote:

      [color=blue]
      > Now the real trouble is the following code:
      >
      > var xmlDoc = new ActiveXObject(" Microsoft.XMLDO M");
      > xmlDoc.async = "false";[/color]

      Should be
      xmlDoc.async = false;
      [color=blue]
      > xmlDoc.load(http://111.222.333.444/btw/Btw2Xml.jsp?parm=NYC);
      >
      > If I have a local file, I can do the load... ( the url shown is a fake one)
      >
      > If I put very same file on my webserver, I get a an "access error" in IE on
      > the 3rd line show, character 7.[/color]

      If you have script in a page served from http://example.com/ then using
      Microsoft.XMLDO M you can only load URLs from that host
      http://example.com/, at least with the normal security settings in IE.
      I think you can make http://example.com/ a trusted site and thereby
      allow it to connect to other servers.

      --

      Martin Honnen

      Comment

      • Jean Pion

        #4
        Re: JavaScrip, xml

        Thanks Martin,

        That sounds very reasonable...
        I tried this, but I still have the same troubles.
        Even checked all the options for trusted sites, which seem to allow for
        cross-domain activities.

        Now trough yout link found that:

        Set the domain property only if you must allow cross-domain scripting. Use a
        value determined on the server. Setting this property to a value determined
        on the client (like through the location object) could expose your site to
        attack from another site through Domain Name System (DNS) manipulation.

        But I'm unsure what it means but I think it is releated.
        Any examples?

        Tia, Jean.

        "Martin Honnen" <mahotrash@yaho o.de> schreef in bericht
        news:41c80693$0 $29426$9b4e6d93 @newsread4.arco r-online.net...[color=blue]
        >
        >
        > Jean Pion wrote:
        >
        >[color=green]
        > > Now the real trouble is the following code:
        > >
        > > var xmlDoc = new ActiveXObject(" Microsoft.XMLDO M");
        > > xmlDoc.async = "false";[/color]
        >
        > Should be
        > xmlDoc.async = false;
        >[color=green]
        > > xmlDoc.load(http://111.222.333.444/btw/Btw2Xml.jsp?parm=NYC);
        > >
        > > If I have a local file, I can do the load... ( the url shown is a fake[/color][/color]
        one)[color=blue][color=green]
        > >
        > > If I put very same file on my webserver, I get a an "access error" in IE[/color][/color]
        on[color=blue][color=green]
        > > the 3rd line show, character 7.[/color]
        >
        > If you have script in a page served from http://example.com/ then using
        > Microsoft.XMLDO M you can only load URLs from that host
        > http://example.com/, at least with the normal security settings in IE.
        > I think you can make http://example.com/ a trusted site and thereby
        > allow it to connect to other servers.
        >
        > --
        >
        > Martin Honnen
        > http://JavaScript.FAQTs.com/[/color]


        Comment

        • Jean Pion

          #5
          Re: JavaScrip, xml

          Thanks Martin,

          Oh dear, oh dear. In my hury I 'trusted' the the wrong site.
          So, to follow your example:

          If you have script in a page served from http://www.example.com then using
          Microsoft.XMLDO M you can load URLs from http://www.elsewhere.com
          if you can make http://www.example.com a trusted site.

          You were right, thank you.
          I was confused and tried to 'trust' http://www.elsewhere.com but that does
          not work.

          Jean

          "Jean Pion" <jean_pion@hotm ail.com> schreef in bericht
          news:c4007$41c8 1c44$513a1b62$2 033@news1.zonne t.nl...[color=blue]
          > Thanks Martin,
          >
          > That sounds very reasonable...
          > I tried this, but I still have the same troubles.
          > Even checked all the options for trusted sites, which seem to allow for
          > cross-domain activities.
          >
          > Now trough yout link found that:
          >
          > Set the domain property only if you must allow cross-domain scripting. Use[/color]
          a[color=blue]
          > value determined on the server. Setting this property to a value[/color]
          determined[color=blue]
          > on the client (like through the location object) could expose your site to
          > attack from another site through Domain Name System (DNS) manipulation.
          >
          > But I'm unsure what it means but I think it is releated.
          > Any examples?
          >
          > Tia, Jean.
          >
          > "Martin Honnen" <mahotrash@yaho o.de> schreef in bericht
          > news:41c80693$0 $29426$9b4e6d93 @newsread4.arco r-online.net...[color=green]
          > >
          > >
          > > Jean Pion wrote:
          > >
          > >[color=darkred]
          > > > Now the real trouble is the following code:
          > > >
          > > > var xmlDoc = new ActiveXObject(" Microsoft.XMLDO M");
          > > > xmlDoc.async = "false";[/color]
          > >
          > > Should be
          > > xmlDoc.async = false;
          > >[color=darkred]
          > > > xmlDoc.load(http://111.222.333.444/btw/Btw2Xml.jsp?parm=NYC);
          > > >
          > > > If I have a local file, I can do the load... ( the url shown is a fake[/color][/color]
          > one)[color=green][color=darkred]
          > > >
          > > > If I put very same file on my webserver, I get a an "access error" in[/color][/color][/color]
          IE[color=blue]
          > on[color=green][color=darkred]
          > > > the 3rd line show, character 7.[/color]
          > >
          > > If you have script in a page served from http://example.com/ then using
          > > Microsoft.XMLDO M you can only load URLs from that host
          > > http://example.com/, at least with the normal security settings in IE.
          > > I think you can make http://example.com/ a trusted site and thereby
          > > allow it to connect to other servers.
          > >
          > > --
          > >
          > > Martin Honnen
          > > http://JavaScript.FAQTs.com/[/color]
          >
          >[/color]


          Comment

          • Mark Preston

            #6
            Re: JavaScrip, xml and Linux

            Jean Pion wrote:[color=blue]
            > Dear readers,
            >
            > Can I use the following object on a Linux based web server:
            >
            > var xmlDoc = new ActiveXObject(" Microsoft.XMLDO M");
            >
            > If not, is there a compatible object?
            >[/color]
            Jean,

            I see you already have a few answers, but not about the actual problem.
            As a test, can you imagine where a Linux system would get hold of either
            ActiveXObjects or Microsoft.XMLDO M?

            That's right - neither can I. Both are, after all, _Microsoft_ products
            which are in notoriously short supply on Linux systems...

            Comment

            Working...