Permalink
Browse files

MDL-23254 Authentication : used httpswwwroot as root url during authe…

…ntication procedure where $PAGE->https_required() is specified.

Conflicts:

	auth/shibboleth/login.php
  • Loading branch information...
1 parent bf49804 commit 5aba6e506d6cbe029e8775e4e1f9064248950a5c @nebgor nebgor committed with Sam Hemelryk Jun 28, 2012
Showing with 10 additions and 8 deletions.
  1. +3 −2 auth/ldap/ntlmsso_attempt.php
  2. +2 −1 auth/ldap/ntlmsso_magic.php
  3. +5 −5 auth/shibboleth/login.php
@@ -33,8 +33,9 @@
$PAGE->set_heading($site->fullname);
echo $OUTPUT->header();
+// $PAGE->https_required() up above takes care of what $CFG->httpswwwroot should be.
$msg = '<p>'.get_string('ntlmsso_attempting', 'auth_ldap').'</p>'
. '<img width="1", height="1" '
- . ' src="' . $CFG->wwwroot . '/auth/ldap/ntlmsso_magic.php?sesskey='
+ . ' src="' . $CFG->httpswwwroot . '/auth/ldap/ntlmsso_magic.php?sesskey='
. $sesskey . '" />';
-redirect($CFG->wwwroot . '/auth/ldap/ntlmsso_finish.php', $msg, 3);
+redirect($CFG->httpswwwroot . '/auth/ldap/ntlmsso_finish.php', $msg, 3);
@@ -29,7 +29,8 @@
if ($authplugin->ntlmsso_magic($sesskey) && file_exists($file)) {
if (!empty($authplugin->config->ntlmsso_ie_fastpath)) {
if (check_browser_version('MSIE')) {
- redirect($CFG->wwwroot.'/auth/ldap/ntlmsso_finish.php');
+ // $PAGE->https_required() up above takes care of what $CFG->httpswwwroot should be.
+ redirect($CFG->httpswwwroot.'/auth/ldap/ntlmsso_finish.php');
}
}
View
@@ -44,17 +44,17 @@
// Redirect to SessionInitiator with entityID as argument
if (isset($IdPs[$selectedIdP][1]) && !empty($IdPs[$selectedIdP][1])){
// For Shibbolet 1.x Service Providers
- header('Location: '.$IdPs[$selectedIdP][1].'?providerId='. urlencode($selectedIdP) .'&target='. urlencode($CFG->wwwroot.'/auth/shibboleth/index.php'));
+ header('Location: '.$IdPs[$selectedIdP][1].'?providerId='. urlencode($selectedIdP) .'&target='. urlencode($CFG->httpswwwroot.'/auth/shibboleth/index.php'));
- // For Shibbolet 2.x Service Providers
- // header('Location: '.$IdPs[$selectedIdP][1].'?entityID='. urlencode($selectedIdP) .'&target='. urlencode($CFG->wwwroot.'/auth/shibboleth/index.php'));
+ // For Shibbolet 2.x Service Providers
+ // header('Location: '.$IdPs[$selectedIdP][1].'?entityID='. urlencode($selectedIdP) .'&target='. urlencode($CFG->httpswwwroot.'/auth/shibboleth/index.php'));
} else {
// For Shibbolet 1.x Service Providers
- header('Location: /Shibboleth.sso?providerId='. urlencode($selectedIdP) .'&target='. urlencode($CFG->wwwroot.'/auth/shibboleth/index.php'));
+ header('Location: /Shibboleth.sso?providerId='. urlencode($selectedIdP) .'&target='. urlencode($CFG->httpswwwroot.'/auth/shibboleth/index.php'));
// For Shibboleth 2.x Service Providers
- // header('Location: /Shibboleth.sso/DS?entityID='. urlencode($selectedIdP) .'&target='. urlencode($CFG->wwwroot.'/auth/shibboleth/index.php'));
+ // header('Location: /Shibboleth.sso/DS?entityID='. urlencode($selectedIdP) .'&target='. urlencode($CFG->httpswwwroot.'/auth/shibboleth/index.php'));
}
} elseif (isset($_POST['idp']) && !isset($IdPs[$_POST['idp']])) {
$errormsg = get_string('auth_shibboleth_errormsg', 'auth_shibboleth');

0 comments on commit 5aba6e5

Please sign in to comment.