Sorry the previous message.  Email client problems.

I think I understand what you're getting at.  I dug through the code a bit late 
last night, and can definately see that its not straightforward as I thought.  
Its the Authenticator framework in java that abstracts away some of the details 
that we need.  

My assumption is that the actual loading of the remove content is done with the 
URLUtil class.  When the URL.openConnection() method is called and the server 
requires authentication, java calls back to the XXE Authenticator module 
automatically.  Couldn't we modify the openConnection(URL, boolean) method to 
test if the connection returned is a java.net.HttpURLConnection?  If so, you 
then have access to the response code and message.

What heuristic did you use to workaround this?

Cheers,
Mike


-----Original Message-----
From: Hussein Shafie [mailto:[email protected]]
Sent: Fri 8/31/2007 6:02 AM
To: Santy, Michael
Cc: xmleditor-support at xmlmind.com
Subject: Re: [XXE] re-prompting user for credentials when loading over HTTP 
with        Basic auth
 
Santy, Michael wrote:
> 
> XXE properly prompts a user for authentication when trying to load an 
> XML file over HTTP protected with Basic authentication, but if a user 
> incorrectly enters their credentials, XXE gives an error message and 
> does not prompt the user to re-enter their credentials.  I think it 
> makes sense to re-prompt the user for their credentials as web browser 
> currently do.  Would it be possible to get this feature added?
> 

This problem is not easy to fix because it is not XXE which prompts a 
user for authentication when trying  to load an XML file over HTTP 
protected with Basic authentication, it is the Java runtime which does 
that (without giving XXE much information about the current context). 
XXE just provides the password dialog box.

We have added a workaround for the problem you described based on a 
heuristic. We hope that this workaround 1) will work in the real world, 
2) will not cause more problems than the one it solves.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20070831/0f031d6e/attachment.htm
 

Reply via email to