mirror of
https://github.com/moodle/moodle.git
synced 2025-04-19 23:42:11 +02:00
If config wwwroot starts with 'https', ignore config loginhttps value.
Dependency: Bug #5647; Merged from MOODLE_16_STABLE.
This commit is contained in:
parent
8af190b388
commit
8761b0bc4f
@ -47,7 +47,7 @@ if (!isset($frm->acceptccs)) {
|
||||
<td><?php print_string("currency") ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if (substr($CFG->wwwroot, 0, 5) !== 'https') { /* https && loginhttps */ ?>
|
||||
<tr valign="top">
|
||||
<td align="right">loginhttps:</td>
|
||||
<td><?php echo (empty($CFG->loginhttps) ? "<font color=\"red\"><b>off</b></font>" : "<font color=\"green\">on</font>") ?></td>
|
||||
@ -56,7 +56,7 @@ if (!isset($frm->acceptccs)) {
|
||||
print_string("logindesc", "enrol_authorize", $a)
|
||||
?></td>
|
||||
</tr>
|
||||
|
||||
<?php } /* end: https && loginhttps */ ?>
|
||||
<tr valign="top"><td colspan="3"><h4><?php print_string("adminauthorizesettings", "enrol_authorize") ?></h4></td></tr>
|
||||
|
||||
<tr valign="top">
|
||||
|
@ -451,7 +451,7 @@ class enrolment_plugin_authorize
|
||||
notify('PHP must be compiled with SSL support (--with-openssl)');
|
||||
}
|
||||
|
||||
if (empty($CFG->loginhttps)) {
|
||||
if (empty($CFG->loginhttps) and substr($CFG->wwwroot, 0, 5) !== 'https') {
|
||||
notify('loginhttps must be ON');
|
||||
}
|
||||
|
||||
@ -540,8 +540,10 @@ class enrolment_plugin_authorize
|
||||
$tranval = optional_param('an_tran_key', '');
|
||||
$passwordval = optional_param('an_password', '');
|
||||
|
||||
if (empty($CFG->loginhttps) || (!$this->check_openssl_loaded()) ||
|
||||
empty($loginval) || (empty($tranval) && empty($passwordval))) {
|
||||
if ((empty($CFG->loginhttps) and substr($CFG->wwwroot, 0, 5) !== 'https') ||
|
||||
!$this->check_openssl_loaded() ||
|
||||
empty($loginval) ||
|
||||
(empty($tranval) and empty($passwordval))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user