ucla/mwf — Issue #82: Infinite Redirect With Port Number
Author: loganfranken
Created: 2012-01-26 08:13:11+00:00
State: open

I host UCLA MWF locally on WampServer over Port 8080 (so I access my local instance over URLs like http://uclamwf.local:8080). This results in an infinite redirect because `mwf.site.local.isSameOrigin()` always returns false. This is because `mwf.site.cookie.domain` is equal to `$_SERVER['HTTP_HOST']` ("uclamwf.local:8080"), but `mwf.site.domain()` returns a stripped URL ("uclamwf.local"), causing the following to always evaluate to false (which, in turn, causes the infinite redirect):

```javascript
var serviceProvider = "."+mwf.site.cookie.domain.toLowerCase();
var contentProvider = "."+this.domain.toLowerCase();

_isSameOrigin = contentProvider.substring(contentProvider.length - serviceProvider.length, serviceProvider.length) == serviceProvider;
```

This was occurring for me in the latest off develop-1.2.

I realize this is a bit of an edge case. I'll take a look at a fix soon; this was just preventing me from working on another piece of the framework, so I wanted to document it.