views:

920

answers:

2

In flash you can open a file on the user's computer. In flash 9 you can upload and download the file and in flash 10 you can access the contents of the file.

It is secure because the user has to choose the file from a file dialog box to allow flash access to it.

What I would like to do in my application is to get a directory listing of the files/subdirectories in a directory. It's not really any different from uploading a file chosen by the user to list the contents of a directory chosen by the user so I don't see any security implications. I don't need to access the files, just list them,

But there appears to be no way in flash to do this? Am I right or am I missing something?

I can always use a signed java applet instead if necessary but flash seems more appropriate for my particular application so I thought it worth asking the question.

+1  A: 

It is insecure, unless, perhaps, you ask the user to point to the wanted directory with a folder browse dialog, if we remain in the above logic...
Even them, users can inadvertently give more information than they should with this mean.
Like when they open all the Documents and Settings folder to P2P networks... :-)

Insecure because then people can get interesting file names, perhaps explore browser caches, etc.

PhiLho
A: 

Yes I would want the user to point to the directory, I don't want to breach security.

Basically I want to make a page which looks which plugins are already installed on a users system so it can offer downloads of ones they don't already have. It's a convenience for users who go to this web page for that specific service.

But I understand the security implications which is why I was dubious that this would be possible but it seemed worth asking.

John Burton
I think there are other ways to list installed plugins in a browser, by asking the browser itself. Of course, methods vary with browser...
PhiLho