Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Relogin and Ip-address causes infinite loop

    hi,

    I noticed that the relogin script for the login page does not thow an Exception when the domain is an ip-address. This causes an infinite loop.

    I just added
    Code:
    document.domain = document.domain.replace(/.*?\./, '');
    after
    Code:
    if (window.opener && window.opener.isc) break;
    if (window.top.isc) break;
    It works fine now. Can we use this as workaround?

    Full Script:
    Code:
    <SCRIPT>//'"]]>>isc_loginRequired
    //
    // Embed this whole script block VERBATIM into your login page to enable
    // SmartClient RPC relogin.
    
    if (!window.isc && (window.opener != null || window.top != window)) {
    	while (document.domain.indexOf(".") != -1) {
    		try {
    			if (window.opener && window.opener.isc) break;
    			if (window.top.isc) break;
    			document.domain = document.domain.replace(/.*?\./, '');
    		} catch (e) {
    			try {
    				document.domain = document.domain.replace(/.*?\./, '');
    			} catch (ee) {
    				break;
    			}
    		}
    	} 
    }
    
    var isc = top.isc ? top.isc : window.opener ? window.opener.isc : null;
    if (isc && isc.RPCManager) isc.RPCManager.delayCall("handleLoginRequired", [window]);
    </SCRIPT>
    Last edited by escrea; 30 Dec 2011, 07:07.

    #2
    It looks like there is a hole here. We'll be resolving this in the framework and we'll post the updated version (which will likely look very much like what you already have) here.

    For now your workaround will be fine.

    Comment

    Working...
    X