xforms:load doesn't seem to support the file: protocol

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

xforms:load doesn't seem to support the file: protocol

Eric van der Vlist
Hi,

While xforms:load works fine with some protocols (http: and mailto: for
instance), I haven't been able to get it working with the "file:"
protocol even in a straightforward way such as:

 <xforms:trigger appearance="xxforms:link">
  <xforms:label>go</xforms:label>
  <xforms:load resource="file:/home/vdv" ev:event="DOMActivate"/>
 </xforms:trigger>

(Tested on Linux with Epiphany (Mozilla based browser) and Firefox).

Eric
--
Weblog:
                 http://eric.van-der-vlist.com/blog?t=category&a=English
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: xforms:load doesn't seem to support the file: protocol

Eric van der Vlist
Le jeudi 17 novembre 2005 à 00:09 +0100, Eric van der Vlist a écrit :

> Hi,
>
> While xforms:load works fine with some protocols (http: and mailto: for
> instance), I haven't been able to get it working with the "file:"
> protocol even in a straightforward way such as:
>
>  <xforms:trigger appearance="xxforms:link">
>   <xforms:label>go</xforms:label>
>   <xforms:load resource="file:/home/vdv" ev:event="DOMActivate"/>
>  </xforms:trigger>
>
> (Tested on Linux with Epiphany (Mozilla based browser) and Firefox).
Hmmm... this appears to be a security issue and the error windows says:

"Erreur :
Access to 'file:///home/vdv' from script denied"

I'll check if this behavior can be disabled...

Eric

--
Freelance consulting and training.
                                            http://dyomedea.com/english/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: xforms:load doesn't seem to support the file: protocol

Eric van der Vlist
Le jeudi 17 novembre 2005 à 00:14 +0100, Eric van der Vlist a écrit :

> Le jeudi 17 novembre 2005 à 00:09 +0100, Eric van der Vlist a écrit :
> > Hi,
> >
> > While xforms:load works fine with some protocols (http: and mailto: for
> > instance), I haven't been able to get it working with the "file:"
> > protocol even in a straightforward way such as:
> >
> >  <xforms:trigger appearance="xxforms:link">
> >   <xforms:label>go</xforms:label>
> >   <xforms:load resource="file:/home/vdv" ev:event="DOMActivate"/>
> >  </xforms:trigger>
> >
> > (Tested on Linux with Epiphany (Mozilla based browser) and Firefox).
>
> Hmmm... this appears to be a security issue and the error windows says:
>
> "Erreur :
> Access to 'file:///home/vdv' from script denied"
>
> I'll check if this behavior can be disabled...
Doesn't seem so.

Firefox considers that both:

 window.location.href = resource;

and

 window.open(resource, "_blank");

are attempts to access to "resource" exactly like if the script wanted
to read "resource" (which, of course, would be dangerous when the script
comes from the web and resource is on our filesystem)...

Any idea how I could workaround this behavior?

Thanks,

Eric

--
Lisez-moi sur XMLfr.
                       http://xmlfr.org/index/person/eric+van+der+vlist/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: xforms:load doesn't seem to support the file: protocol

Alessandro  Vernet
Administrator
On 11/16/05, Eric van der Vlist <[hidden email]> wrote:
> Any idea how I could workaround this behavior?

Eric,

You can use IE which apparently does not enforce this constraint ;).

Alex
--
Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: xforms:load doesn't seem to support the file: protocol

Erik Bruchez
Administrator
Alessandro Vernet wrote:
> On 11/16/05, Eric van der Vlist <[hidden email]> wrote:
>
>>Any idea how I could workaround this behavior?
>
>
> Eric,
>
> You can use IE which apparently does not enforce this constraint ;).

I doubt IE will work on Eric's Linux machine ;-)

It seems to me that they have decided that a page loaded from HTTP
cannot redirect you to a page on your local filesystem. Save for a
security bug, or for a way to tell Firefox to prompt the user in order
to be granted access, this is not going to be possible out of the box
with Firefox.

-Erik




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: xforms:load doesn't seem to support the file: protocol

Eric van der Vlist
Le jeudi 17 novembre 2005 à 11:21 +0100, Erik Bruchez a écrit :

> Alessandro Vernet wrote:
> > On 11/16/05, Eric van der Vlist <[hidden email]> wrote:
> >
> >>Any idea how I could workaround this behavior?
> >
> >
> > Eric,
> >
> > You can use IE which apparently does not enforce this constraint ;).
>
> I doubt IE will work on Eric's Linux machine ;-)
It happens to work from time to time under Wine but that's far from
being reliable!

> It seems to me that they have decided that a page loaded from HTTP
> cannot redirect you to a page on your local filesystem. Save for a
> security bug, or for a way to tell Firefox to prompt the user in order
> to be granted access, this is not going to be possible out of the box
> with Firefox.

Yes, looks like this is a hack to avoid that Javascript could retrieve
information from your filesystem through frames and/or iframes...

Eric

--
Curious about Relax NG? Read my book online.
                                   http://books.xmlschemata.org/relaxng/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws