MezzoNZ / crunchy

Automatically exported from code.google.com/p/crunchy
0 stars 0 forks source link

local file upload not working properly with Firefox 3.0 RC #125

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use Firefox 3.0 RC
2. Start Crunchy and go to Browsing
3. Attempt to load an html file *not* located at server root.

What is the expected output? What do you see instead?
The file path is truncated to only the file name.  As a result, Crunchy
attempts to load it from the server root - and fails.

This is after I made a first change to the file uploader as documented in a
blog post:
http://aroberge.blogspot.com/2008/04/firefox-3b5-pain-of-using-bleeding-edge.htm
l

This should be fixed for 1.0 - but I would probably be more easily solved
using a javascript library as per issue 122.

Original issue reported on code.google.com by andre.ro...@gmail.com on 3 Jun 2008 at 10:14

GoogleCodeExporter commented 8 years ago
From:
http://developer.mozilla.org/en/docs/Updating_web_applications_for_Firefox_3

File upload fields

In prior versions of Firefox, there were cases in which when the user submitted 
a
file for uploading, the entire path of the file was available to the web 
application.
This privacy concern has been resolved in Firefox 3; now only the filename 
itself is
available to the web application. 

===
This may turn out to be significant problem.  We have to investigate if this 
issue
affects the file loader for editarea as well.

Original comment by andre.ro...@gmail.com on 17 Jun 2008 at 5:52

GoogleCodeExporter commented 8 years ago
It does affect the file load/save feature in editarea.  We need to find a work 
around...

Original comment by andre.ro...@gmail.com on 18 Jun 2008 at 3:27

GoogleCodeExporter commented 8 years ago
Because this change was made in Mozilla for privacy reasons, I suppose there is 
no
possibility to go back to the old behavior in pure html + javascript... and if 
it is
possible, we should fill a bug at mozilla ;-)

However, we can use the crunchy server and ask python to display a file 
selection dialog.
The easiest way could be to open a graphical dialog (in tkinter, by example), 
but
this doesn't work if there is many users using Crunchy (the dialog will be open 
in
the session of the user who started Crunchy).
The better way, IMHO, is to open a html popup (like the help() one), and to 
provide
inside a file selection dialog, using the python server to get the list of 
files.

In a multi-user environment, this will allow an user to explore directory which 
can
be accessed by the user running Crunchy, but maybe not it's own (if the user 
running
Crunchy cannot read it). I thinks it is not really an issue, because in all 
cases,
all users can access to what Crunchy as access, and with the current file 
input, if
the user see files as it's own user, Crunchy can only deal with files it can 
access.

Original comment by florian....@gmail.com on 2 Jul 2008 at 1:26

GoogleCodeExporter commented 8 years ago
Good idea about the popup.  I would suggest we could base it on
http://abeautifulsite.net/notebook.php?article=58
after we complete the jquery integration.

Original comment by andre.ro...@gmail.com on 2 Jul 2008 at 1:33

GoogleCodeExporter commented 8 years ago
The original issue is now fixed, thanks to jquery FileTree plugin.  It now 
needs to
be adapted for the save/load feature from editarea, as noted in the second 
comment.

Original comment by andre.ro...@gmail.com on 2 Oct 2008 at 12:18

GoogleCodeExporter commented 8 years ago
Fixed.  final changes in revision 1021.

Original comment by andre.ro...@gmail.com on 3 Oct 2008 at 12:06