-
Bug
-
Resolution: Fixed
-
P3
-
7u6
-
Java Plug-in 10.6.0.16
Using JRE version 1.7.0_06-ea-b16 Java HotSpot(TM) 64-Bit Server VM
Firefox Version 13.0.1 User Agent
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko/20100101 Firefox/13.0.1
I've attached a sample testcase:
Run the applet
Click the button:
FileSaveService is called, trying to save a file on the local filesystem.
try {
FileSaveService fileSaveService = (FileSaveService) ServiceManager.lookup("javax.jnlp.FileSaveService");
ByteArrayOutputStream os = new ByteArrayOutputStream();
os.write(10);
InputStream imageInputStream = new ByteArrayInputStream(os.toByteArray());
String[] extenstions = {"png"};
fileSaveService.saveFileDialog(null, extenstions, imageInputStream, "name.png");
} catch(Exception e) {
logger.log(Level.WARNING, e.toString(), e);
}
RESULT:
A security dialog is shown requesting for a filesytem access -> User clicks 'OK" -> JVM and browser hang and the applet freezes, no FileChooser is shown
The same code works under Windows
Run the applet
Click the button:
FileSaveService is called, trying to save a file on the local filesystem.
try {
FileSaveService fileSaveService = (FileSaveService) ServiceManager.lookup("javax.jnlp.FileSaveService");
ByteArrayOutputStream os = new ByteArrayOutputStream();
os.write(10);
InputStream imageInputStream = new ByteArrayInputStream(os.toByteArray());
String[] extenstions = {"png"};
fileSaveService.saveFileDialog(null, extenstions, imageInputStream, "name.png");
} catch(Exception e) {
logger.log(Level.WARNING, e.toString(), e);
}
RESULT:
A security dialog is shown requesting for a filesytem access -> User clicks 'OK" -> JVM and browser hang and the applet freezes, no FileChooser is shown
The same code works under Windows