Does anyone else think that the security of Silverlight 4 is a bit of chatter?
Look at the following scenario:
- Silverlight, when installing a trusted application and exiting browser mode, allows you to view the file using the file open dialog.
- You need a file path name to open it from any COM automation. For example (excel / word), but it could be anything.
- Unable to retrieve the full file path from the dialog due to security restrictions.
- However, you can use COM FileSystemObject - to do what you want for the user file system, including creating folders, moving and deleting files.
In other words, why all the fuss about security in Silverlight that actually interferes with real business use cases, when you can access any file in any case using COM?
Saying it differently if a user launches a silverlight malware application is unlikely to say - well, that was a COM error. After that, COM was called by the Silverlight application.
Here is what I mean ....
- The user is viewing the file - c: \ myFile.xls
- Silverlight does not allow you to get the path (for security reasons)
- Silverlight lets you work with my documents
- With COM, you can do anything on the file system in the background. Including copying this file to my documents if you knew this name! But in addition, you can destroy any file potentially if it is not used.
In my opinion, the Silverlight security model is erroneous, or they should have given developers full trust and allowed us to run applications as if they were running locally
or
Silverlight is not allowed to access COM.
Is it just me, or can anyone else see that this is a bad implementation?
This triggers security warnings:
OpenFileDialog flDialog = new OpenFileDialog(); FileInfo fs = flDialog.File; string fileName = fs.FullName;
Is not
dynamic fileSystem = AutomationFactory.CreateObject("Scripting.FileSystemObject"); fileSystem.CopyFile(anyFileName,anyDestination);
source share