grnq / joid

Java OpenID = JOID OpenID providers and relying parties for OpenID 1.1 and 2.0
Other
4 stars 0 forks source link

JOID fails to handle openID username with query string #8

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. User attempts to login with username such as
http://www.mycompanycom/?user=XXX@anothercompany.com 

What is the expected output? What do you see instead?
Expected behavior is user is redirected to login form.
Instead the following is logged.
java.lang.NullPointerException: null
org.verisign.joid.consumer.JoidConsumer.getAuthUrl (JoidConsumer.java:176)

What version of the product are you using? On what operating system?
latest version from SVN.  OS is windows but this should not matter.

Please provide any additional information below.

Suggest the following changes:

Util.send:
            char token = '?';
            if(dest.indexOf('?') > -1) {
                token = '&';
            }
        URL url = new URL(dest+ token +toSend);
JOIDConsumer.getAuthURL
        String serverURL = idserver.getServer();
        char token = '?';
        if(serverURL.indexOf('?') > -1) {
            token = '&';
        }
        return  serverURL+ token + ar.toUrlString();

Both of these will check for the existence of a query string prior to
automatically appending a ?.  If there is already a query string, just
append the remainder onto the existing query string starting with a '&'.

Original issue reported on code.google.com by kaplin...@alum.bentley.edu on 16 Oct 2007 at 3:13

GoogleCodeExporter commented 9 years ago
Bug #10 resolves the Util.send use case but I think the JOIDConsumer.getAuthURL 
is
still valid at this time.

Original comment by tod...@us.ibm.com on 30 Mar 2008 at 3:30