-
Bug
-
Resolution: Fixed
-
P2
-
1.3.0_01
-
beta2
-
x86
-
generic
This is from bugzilla bug: http://bugzilla.mozilla.org/show_bug.cgi?id=80685
Reproducible: Always
Steps to Reproduce:
1. Go to http://www.dreamone.com/
2. Notice applet with peom quote works
3. Go to http://www.dreamone.com/testes/
4. Input username "testing" password "test" to browser
5. input username "testing" password "test" to Java applet
6. Notice applet does not work.
This is from my own analysis.
Problem 1: The Sun java plugin doesn't check for a null return from
Authenticator.getRequestingSite here:
D:\Projects\ladybird\ext\plugin\java\src\sun\plugin\PluginAuthenticator.java
getPasswordAuthentication():
// Request the username/password from the user
pa = openDialog(getRequestingSite().toString(), getRequestingPrompt(), getRequestingScheme());
This causes the password dialog not to be opened, which causes the
applet to fail.
Problem 2:
The reason getRequestingSite() returns null is in:
D:\Projects\ladybird\src\share\classes\sun\net\www\protocol\http\HttpURLConnection.java
getServerAuthentication()
if (ret == null) {
try {
addr = InetAddress.getByName(url.getHost());
} catch (java.net.UnknownHostException ignored) {
// User will have an unknown host.
System.out.println("debug: edburns: Unknown host, plugin gets NullPointerException");
}
}
When I recompile the HttpURLConnection.java and run with the recompiled
class, the error message is:
debug: edburns: Unknown host, plugin gets NullPointerException: url: http://www.dreamone.com/testes/dreams.class
For some reason, InetAddress.getByName() is failing.
I have posted a fix to the "Suggested Fix" section. This fix allows the applet to work on my machine.
Reproducible: Always
Steps to Reproduce:
1. Go to http://www.dreamone.com/
2. Notice applet with peom quote works
3. Go to http://www.dreamone.com/testes/
4. Input username "testing" password "test" to browser
5. input username "testing" password "test" to Java applet
6. Notice applet does not work.
This is from my own analysis.
Problem 1: The Sun java plugin doesn't check for a null return from
Authenticator.getRequestingSite here:
D:\Projects\ladybird\ext\plugin\java\src\sun\plugin\PluginAuthenticator.java
getPasswordAuthentication():
// Request the username/password from the user
pa = openDialog(getRequestingSite().toString(), getRequestingPrompt(), getRequestingScheme());
This causes the password dialog not to be opened, which causes the
applet to fail.
Problem 2:
The reason getRequestingSite() returns null is in:
D:\Projects\ladybird\src\share\classes\sun\net\www\protocol\http\HttpURLConnection.java
getServerAuthentication()
if (ret == null) {
try {
addr = InetAddress.getByName(url.getHost());
} catch (java.net.UnknownHostException ignored) {
// User will have an unknown host.
System.out.println("debug: edburns: Unknown host, plugin gets NullPointerException");
}
}
When I recompile the HttpURLConnection.java and run with the recompiled
class, the error message is:
debug: edburns: Unknown host, plugin gets NullPointerException: url: http://www.dreamone.com/testes/dreams.class
For some reason, InetAddress.getByName() is failing.
I have posted a fix to the "Suggested Fix" section. This fix allows the applet to work on my machine.