Broken for sites with a base url that included /drupal (or other path info)
| Project: | Shared Sign-On |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
The master site url setting requires a URL without any path information. In other words, http://my.domain.com instead of http://my.domain.com/drupal.
However, all of my sites include /drupal in the name. Consequently, the global $base_url base url is always set to http://my.domain.com/drupal.
The code compares the global $base_url to the master site url in several places. Since they don't match, it never makes it past these comparisons and the module is useless.
There's probably several ways to fix this, but I've fixed it by replacing the following code at the top of three different functions:
//global $base_url, $user; //(comment this line out and replace with code below)
global $user;
$base_url = 'http' . (isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] == 'on' ? 's' : '' : '');
$base_url .= '://' .$_SERVER['HTTP_HOST'];I've also found a number of other patches posted on this website useful. It'd be nice if someone had time to roll these all into the module to save people a lot of headache in the future.

#1
Did you test it with the path information there? I know the documentation says not to put in path info, but what happens if you do?
#2
Update; I should've said "Try this on a test site".
#3
Fixed on the DRUPAL-5 branch; not quite the way you said, but should get the same results.
#4
See 1.1
#5
Automatically closed -- issue fixed for two weeks with no activity.