Opened 13 years ago

Closed 12 years ago

#263 closed defect (fixed)

Passing SESSION in Firefox still prompts for authentication

Reported by: amorsell Owned by: madair
Priority: P1 Milestone: 2.0
Component: Core Version: SVN
Severity: Critical Keywords:
Cc: Browser: All
External ID: Operating System: All
state: New

Description

If a valid SessionID is passed as a SESSION URL parameter, Firefox is still presenting the user authentication dialog. This is new behavior in 2.0 beta (or whatever version is with MGOS 2.1 beta). Internet Explorer works fine, however. Related threads:

http://n2.nabble.com/MGE-2010%3A-fusion-pre-authentication-(autologin)-no-longer-works-td2592934.html

And, another user provides this information:

The Firefox issue is fairly straightforward to fix, except for my lack of understanding of the actual cause of the issue.

In ApplicationDefinition.js, the method getAppDef(xhr) needs to be changed to be like this:

getAppDef: function(xhr){

if (xhr && typeof(xhr) == "object" && xhr.responseText) {

this.sessionId = xhr.responseText; Fusion.sessionId = this.sessionId;

} var r = new

Fusion.Lib.MGRequest.MGGetResourceContent(this.applicationDefinition);

r.parameters.session = this.sessionId; r.parameters.format = 'application/json'; this.oBroker.dispatchRequest(r,

OpenLayers.Function.bind(this.getAppDefCB, this));

}

Basically what happens is that this function is called by this line of code: "window.setTimeout(OpenLayers.Function.bind(this.getAppDef,this),5);". For a reason that I couldn't identify due to lack of time, the value of xhr is sometimes equal to 5. Therefore, this causes the code to go into assigning 5.responseText (undefined) to this.sessionId and making it require to login again.

I'm guessing it has something to do with an underlying library doing some funky binding/prototyping under Firefox, but I didn't have time to find the cause. My fix only works because it makes sure the xhr parameter is an object and has the responseText parameter, so it's not really a "clean" fix per say, but atleast it makes things work under Firefox.

Change History (3)

comment:1 by msuing, 13 years ago

this one is redundant with http://trac.osgeo.org/mapguide/ticket/1021 #1021 provides additional information but can be closed. Max.

comment:2 by chrisclaydon, 13 years ago

Fixed in trunk by submission:

http://trac.osgeo.org/fusion/changeset/1887

I'm leaving the ticket open for now since I'm not sure if this needs to be ported back into any of the branches.

comment:3 by madair, 12 years ago

Milestone: Future2.0
Resolution: fixed
Status: newclosed

this is applied in the 2.0 branch, trunk and the adsk sandbox, so closing this issue

Note: See TracTickets for help on using tickets.