Closed Bug 102055 Opened 24 years ago Closed 24 years ago

New Java plugin does not allow java applet save image on hard drive

Categories

(Core Graveyard :: Java: OJI, defect)

x86
Windows 2000
defect
Not set
blocker

Tracking

(Not tracked)

VERIFIED INVALID

People

(Reporter: desale, Assigned: xiaobin.lu)

References

()

Details

(Whiteboard: [Need ETA],JRE)

Attachments

(1 file)

ISSUE I'M GOING TO TALK ABOUT IS VERY IMPORTANT FOR OUR TESTING PROCESS. Well for us this new plugin JRE 1.3.1 is blocking Automated Layout Testing completely on Windows 2000. Making changes in java.policy file in older plugin used to allow browser save JPG images on Hard-drive. This new plugin does not allow that to happen. I still have to check what are the effects on Linux, but now I'm trying to resolve this situation. Old plugin JRE 1.3.0_01 was working perfect & it is still working perfect. I dont know what are the differences between two plugins regarding to security issues, but Giving 'read & write' permissions to Java for certain directory on your hard drive should be possible by changing permissions in java.policy file Here is simple testcase I'm providing to prove this. STEPS TO FOLLOW FOR PEOPLE INSIDE NETSCAPE: 1] Open java.policy file from your plugin in any java editor [Like Jpad or something] [java.policy is usually under /lib/security/] 2] Once you open "java.policy" please copy & paste following lines of code at the end exactly before the end curly bracket [ looks like "}" ] permission java.awt.AWTPermission "createRobot"; permission java.awt.AWTPermission "readDisplayPixels"; permission java.io.FilePermission "c:\\images\\*","write"; permission java.io.FilePermission "c:\\images\\*","read"; 3] Save java.policy file 4] create directory called "images" on your c-drive. 5] now load my testcase at http://bubblegum/desale/plugintest/plugintest.html 6] wait for 9-10 seconds till java applet takes screen shot & saves scren as JPG file on your c-drive under "images" directory. 7] Once applet finishes loading, please check your "images" directory on your c-drive. STEPS TO FOLLOW FOR PEOPLE OUTSIDE NETSCAPE [who can not acees internal address]: 1] Open java.policy file from your plugin in any java editor [Like Jpad or something] [java.policy is usually under /lib/security/] 2] Once you open "java.policy" please copy & paste following lines of code at the end exactly before the end curly bracket [ looks like "}" ] permission java.awt.AWTPermission "createRobot"; permission java.awt.AWTPermission "readDisplayPixels"; permission java.io.FilePermission "c:\\images\\*","write"; permission java.io.FilePermission "c:\\images\\*","read"; 3] Save java.policy file 4] create directory called "images" on your c-drive. 5] now download zip file I'm going to attach. [testcase zip file] 6] Unzip this file on your machine. 7] You'll see html file called "plugintest.html". 8] load this "plugintest.html" in browser. 6] wait for 9-10 seconds till java applet takes screen shot & saves scren as JPG file on your c-drive under "images" directory. 7] Once applet finishes loading, please check your "images" directory on your c-drive. EXPECTED RESULTS: Once applet load completely, you should see jpg image called "plugintest.jpg" under "images" directory on your c-drive. ACTUAL RESULTS: 1] with new plugin JRE 1.3.1, you CAN NOT see jpg image called "plugintest.jpg" under "images" directory on your c-drive. 1] with Old plugin JRE 1.3.0_01, you can see jpg image called "plugintest.jpg" under "images" directory on your c-drive. **********This completely blocks our automated testing.************* I would Greatly appreciate any workaround if you know any. Testcase zip file following.
Attached file Testcase zip file
changing qa contact to myself
QA Contact: pmac → desale
severity blocker; OS updated to win2k; nsbranch keyword.
Severity: normal → blocker
Keywords: nsbranch
OS: Windows 95 → Windows 2000
Reassign this bug to myself. I tested this bug with JRE 1.3.1 and JRE 1.4 beta2 (you can get from http://java.sun.com/j2se/). Both can write the screenshot image to the c:\images directory. In other words, I can not reproduce this bug.
Status: NEW → ASSIGNED
Reassign!
Assignee: joe.chou → xiaobin.lu
Status: ASSIGNED → NEW
Did you try it on Windows-2000 ? we are seeing this on Windows-2000.
what are the chances of this making the 0.9.4 branch?
Whiteboard: [Need ETA]
I have not tried Win2k yet because I don't have WIn2k at hand. Can you reproduce this in WindowsNT?
I'll try to arrange testing it on NT. you tested this on NT ? This works fine on Win98. So far I see this problem only on Win-2000. I'll get back to you once I test this on NT too.
Tested on NT, works fine.
Then it has to be win-2000 specific. We have have 2 windows-2000 machines where I'm seeing this problem. Is there anyway you can get access to some win2k machine ?
Marking JRE in the Status Whiteboard to get on the radar, but I think this should be minused.
Summary: New Java plugin does not allow java applet save image on hard drive. → New Java plugin does not allow java applet save image on hard drive
Whiteboard: [Need ETA] → [Need ETA],JRE
Prashant, does the 1.4 plugin work for you?
Prashant, The problem occurs when you manually edit the *policy files. What happens when an applet is legitimately signed with a digital signature? Can you test using a dummy digital certificate and a signed applet? Digital signatures ought to work in the same way that they used to in the past. If you have trouble hacking this together, find me in my cube and we can hack it :-) If editing the *policy files achieves the same end as signing applets, then this makes no difference. Xiaobin, do you think this is a good test?
Arun: Yes this is a good test and I belive it should work too. Anyway, I will test in Win2K first then I will do the certificate test. Thank you for your suggestion.
Sure Arun, That sounds good test. I'm very curious to find what Xiaobin finds on win2k. I've seen this on 2 machines only, so I really want to make sure this is not some machine specific stuff. This is fine on WinNT. So strange. Let me know if you want to see applet code too. I can make that code availabe, but I dont see it has anything to do with security. All I'm doing there is creating Robot & capturing screen & encoding it to JPG with encoders. Arun, I dont understand much about signed applets, so surely I'll need your help for that test, but lets see what Xiaobin finds out on win2k test.
grega/jhooker - is this a nsenterprise+ type bug? If not, I propose we nsbranch-, as we do not believe this is common task on the public Internet. Pls nsenterpise+, and bring it to the PDT, if you think it is needed for the enterprise.
Keywords: nsbranchnsbranch-
Prashant, Does your Java Console throw any interesting errors? If so, put them here so we can study them. Typically, you ought to get a security violation. I'm also wondering if on your particular NT/Win2k box, the JRE has file permissions of administrator.
Guys, I'm marking this bug Invalid. This turned out to be very wierd machine specific stuff. Strange thing is it was specific on two different win-2k machines. What we just tried is, we uninstalled all java plugins [this we tried before too] BUT this time we cleared all registry entries with the key "jre", "java", "javasoft", & "jdk". Then we installed new branch build with installing java plugin JRE 1.3.1. To our surprise this time it worked fine. Clearing registry entries seems to have resolved our problem. Thanks to all of you for working on this to resolve our testing blocker issue. Finally our testing is working back again on win-2k which was our main concern. MARKING INVALID.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
Verified.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: