182 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
d989ee1e03 MDL-58853 versions: bump all versions and requires near release
version = 2017051500 release version
requires= 2017050500 current rc1 version
2017-05-09 02:58:28 +02:00
David Mudrák
2b948c204a MDL-58793 auth: Do not report migrated settings as new ones on upgrade
As a result of fixing the auth plugins config storage in MDL-12689, many
settings would be falsely reported as new ones by
admin/upgradesettings.php. We do not want to confuse admins so we try to
reduce the bewilderment by pre-populating the config_plugins table with
default values. This should be done only for disabled auth methods. The
enabled methods have their settings already stored, so reporting actual
new settings for them is valid.
2017-05-08 11:51:55 +02:00
David Mudrák
9f29e45e15 MDL-58793 auth: Fix invalid access to $this in settings.php files
It has never been guaranteed that settings.php would always be included
from inside the core\plugininfo\auth::load_settings() scope only.
Alternative fix would be to use $plugininfo->name but I think it is
better to be explicit here (same as we are explicit with setting names,
strings etc).
2017-05-08 11:47:29 +02:00
David Mudrák
31bd102316 MDL-58692 auth: Improve the migration of auth setting names
Some auth plugins used to have a mix of the legacy style of plugin names
in config_plugins table (such as 'auth/mnet') and the new correct
style (such as 'auth_mnet'). Attempting to rename the setting plugin via
low level SQL UPDATE could lead to duplicate key violation.

The patch introduces a new helper function to safely migrate the old
settings to the new ones, eventually informing the admin about the
values mismatch.
2017-05-03 12:02:43 +02:00
Martin Gauk
8abec10d55 MDL-58244 shibboleth: handle users who are logged out
If the user is (already) logged out, do not access $USER->auth and redirect him to the return URL.
2017-04-13 10:05:39 +00:00
David Monllao
2a69ffd212 MDL-12689 auth_shibboleth: No remote updates 2017-04-06 15:51:27 +02:00
David Monllao
b1e8f8bf37 MDL-12689 mod_data: Remove trailing whitespaces 2017-04-04 00:14:35 +02:00
Stephen Bourget
037273d87e MDL-12689: convert auth plugins to use settings.php 2017-04-03 10:50:09 -04:00
Lukas Hämmerle
056a5138a4 MDL-41729 auth_shibboleth: Allow password change for shibboleth users
This patch modifies can_change_password() and adds change_password_url() to allow Shibboleth users to change their password
in case there is an (external) password change URL defined in Moodle. If no such URL is defined, the behaviour is the same
as without the proposed change.

Thanks FH-HWZ.ch for the contribution.
2016-12-08 09:38:52 +08:00
Eloy Lafuente (stronk7)
04649747a4 MDL-57197 versions: bump all versions and requires near release
version = 2016120500 release version
requires= 2016112900 current rc4 version
2016-11-29 22:57:05 +01:00
David Mudrák
8df850ad6f MDL-46946 user: Make missing required custom fields trigger profile edit
If there is a required custom field that the user can fill by editing
their profile, and that field is missing, the user should be considered
as not fully set up. Instead, we want to redirect them to edit their
profile first.

There are some exceptions when we want to fall back to the previous
behaviour and check just the name and email fields. These exceptional
cases include checking remote user data in incoming MNet request (no
user id, no custom fields supported) and calls to require_login() with
redirecting disabled (typically ajax filepicker requests on profile
editing page itself).

Additional plugins that call the function user_not_fully_set_up()
themselves, should perform the strict check in most/typical cases. So
the strict mode is enabled by default even if it changes the behaviour
slightly. In improbable case of additional plugins relying on the
previous behaviour of the function, they can use the $strict parameter
and keep performing the lax check. However, I am sure the correct fix in
that case will likely be to stop abusing this function.

Note that custom fields are not currently transferred during the MNet
roaming. So having custom fields configured as required on MNet service
provider site (where users can't edit their profiles) is expected to
display an error (as the site is considered as misconfigured).
2016-09-21 17:46:30 +02:00
Eloy Lafuente (stronk7)
1abca11e0a MDL-54638 versions: bump all versions and requires near release
version = 2016052300 release version
requires= 2016051900 current rc1 version
2016-05-19 02:16:15 +02:00
David Monllao
3032b16b3d MDL-53750 shibboleth: Passing a var to empty for PHP 5.4 2016-05-06 09:27:27 +08:00
John Okely
f9ee3dbcc1 MDL-53750 auth: fix logout bug in shibboleth
Original patch by Dr. Michael Schneider
2016-05-06 09:27:25 +08:00
Marina Glancy
4a89e83b80 MDL-52285 auth: use __construct() for constructors 2015-12-10 13:40:42 +08:00
Eloy Lafuente (stronk7)
2e144835bb MDL-52059 versions: bump all versions and requires near release
version = planned 2015111600 release version
requires= current 2015111000 rc3 version
2015-11-10 12:33:52 +01:00
Simey Lameze
4d16a2749f MDL-51162 core: replace all HTTP_RAW_POST_DATA usages
This patch replace all usages of HTTP_RAW_POST_DATA that was deprecated on PHP 5.6 by
file_get_contents('php://input'). Only the TinyMCE library has not been updated.
2015-10-20 10:27:26 +08:00
Simey Lameze
ef6998015f MDL-50884 auth_shibboleth: fix logout handler url generation
This patch fixes the shibboleth redirect url generation, that can create invalid url
if the shibboleth logout_handler setting has a parameter generating two parameters
with (?) instead of (&).

Thanks to Matteo Boni for the proposed solution.
2015-09-14 09:48:55 +08:00
Dan Poltawski
2ac792f579 Merge branch 'MDL-41598-master' of https://github.com/mackensen/moodle 2015-07-27 15:24:31 +01:00
Eloy Lafuente (stronk7)
26ea380d24 MDL-50102 versions: bump all versions and requires near release
version = planned 2015051100 release version
requires= current 2015050500 rc1 version

Note: On purpose, the course format social wrong version (2015102100)
has been kept unmodified. Looking forward a solution right now.
2015-05-05 17:43:19 +02:00
Jan Eberhardt
5921f6974d MDL-31578 auth_shibboleth: Custom fields added to shibboleth settings
Since LDAP is able to sync custom user profile fields, this feature was
requested for Shibboleth.
2015-02-19 13:56:10 +00:00
Simey Lameze
fb60e23a67 MDL-47964 auth_shibboleth: Fix DOS on the shibboleth logout 2015-01-06 10:59:30 +00:00
Didier Raboud
9318de17ef MDL-34437 shibboleth: Correct the shibboleth wiki links. 2014-12-01 14:56:29 +05:30
Eloy Lafuente (stronk7)
de881693f7 MDL-48021 bump: Bump all versions to planned release
This bumps all versions to planned 2.8 release
(2014111000) version and all the dependencies to
current 2.8rc1 (2014110400)
2014-11-04 17:52:35 +01:00
Tony Butler
1e31f11852 MDL-28484 core_lib: Add function for https detection
Signed-off-by: Tony Butler <tonyjbutler@gmail.com>
2014-10-03 13:02:29 +01:00
Mark Nelson
91ad3ef1a2 MDL-46016 auth_shibboleth: updated misleading comment
Also generated a random string for the password field in case it is ever used.
2014-07-03 16:15:44 -07:00
Damyon Wiese
a084ac0db4 MDL-46045 Fix php tags (lowercase) everywhere 2014-06-19 11:05:16 +08:00
Eloy Lafuente (stronk7)
538bf99ece MDL-45486 Bump all versions to planned release
This bumps all versions to planned 2.7 release
(2014051200) version and all the dependencies to
current 2.7rc2 (2014050800)
2014-05-09 02:12:28 +02:00
Matt Petro
5f1b2e8821 MDL-45118 shibboleth: set context on index page 2014-04-15 23:11:32 -04:00
Charles Fulton
f09afcdd28 MDL-41598 auth_shibboleth: don't override wantsurl 2014-02-14 10:51:17 -08:00
Eloy Lafuente (stronk7)
f39c82ebed MDL-42701 Bump all versions near 2.6 release 2013-11-05 02:36:00 +01:00
Mark Nelson
5991cabfd7 MDL-40045 auth: removed unnecessary add_to_log calls
Both LDAP and Shibboleth call complete_user_login which triggers
a user_loggedin event that handles the legacy call to add_to_log.
2013-10-21 11:53:30 +08:00
Petr Škoda
d79d5ac276 MDL-31501 rework user session architecture
List of changes:
 * New OOP API using PHP namespace \core\session\.
 * All handlers now update the sessions table consistently.
 * Experimental DB session support in Oracle.
 * Full support for session file handler (filesystem locking required).
 * New option for alternative session directory.
 * Official memcached session handler support.
 * Workaround for memcached version with non-functional gc.
 * Improved security - forced session id regeneration.
 * Improved compatibility with recent PHP releases.
 * Fixed borked CSS during install in debug mode.
 * Switched to file based sessions in new installs.
 * DB session setting disappears if DB does not support sessions.
 * DB session setting disappears if session handler specified in config.php.
 * Fast purging of sessions used in request only.
 * No legacy distinction -  file, database and memcached support the same functionality.
 * Session handler name included in performance info.
 * Fixed user_loggedin and user_loggedout event triggering.
 * Other minor bugfixing and improvements.
 * Fixed database session segfault if MUC disposed before $DB.

Limitations:
 * Session access time is now updated right after session start.
 * Support for $CFG->sessionlockloggedinonly was removed.
 * First request does not update userid in sessions table.
 * The timeouts may break badly if server hosting forces PHP.ini session settings.
 * The session GC is a lot slower, we do not rely on external session timeouts.
 * There cannot be any hooks triggered at the session write time.
 * File and memcached handlers do not support session lock acquire timeouts.
 * Some low level PHP session functions can not be used directly in Moodle code.
2013-09-21 13:11:56 +02:00
Eloy Lafuente (stronk7)
cedb0aab5a MDL-39434 Bump all versions near 2.5 release 2013-05-01 18:03:29 +02:00
Petr Škoda
60d7078adf MDL-39387 normalise MOODLE_INTERNAL 2013-04-27 15:09:05 +02:00
Petr Škoda
a2f10958ff MDL-39387 fix /auth phpdocs 2013-04-27 15:06:40 +02:00
Dan Poltawski
f94ed34126 MDL-35130 - remove unused string 2013-01-08 10:52:18 +08:00
Charles Fulton
63f329cad5 MDL-35130 shibboleth: remove hard-coded string 2012-12-20 10:28:23 -08:00
Charles Fulton
ab0ccc6731 MDL-37020 auth_shibboleth: check if target variable is actually set 2012-12-05 11:18:37 -08:00
Eloy Lafuente (stronk7)
663dbbc2e6 MDL-36933 Bump everything to 2012112900
(versions, requires and dependencies)
2012-11-30 03:30:09 +01:00
Sam Hemelryk
2ede3d7f35 Merge branch 'MDL-31629-master' of git://github.com/micaherne/moodle 2012-11-06 10:08:43 +13:00
David Tang
54d6517db3 MDL-31629 auth_shibboleth Use correct language string location 2012-10-17 12:56:14 +01:00
Michael Aherne
af402e5677 MDL-36101 auth_shibboleth Show appropriate error message for suspended accounts 2012-10-17 12:37:43 +01:00
Charles Fulton
39323c753d MDL-35153 shibboleth: check for WAYFless URLs 2012-09-13 19:13:58 -07:00
Ankit Agarwal
bf0f06b1be MDL-34471 libraries: Replace all uses of get_context_instance() with respective context_XXXX::instance() method 2012-08-02 15:37:38 +08:00
Rossiani Wijaya
eac75f211d MDL-34553 accessibility compliance for authentication: Add forform input text and select tag 2012-07-31 16:49:25 +08:00
Charles Fulton
258a893c3d MDL-27563 shibboleth: set context on login page 2012-07-08 20:46:34 -07:00
Aparup Banerjee
8128e0c88b MDL-23254 Authentication : used httpswwwroot as root url during authentication procedure where $PAGE->https_required() is specified. 2012-06-28 15:32:33 +08:00
Eloy Lafuente (stronk7)
c5e783e512 MDL-33794 version.php: Bump all versions, requires and dependencies to 2012061700 2012-06-18 02:37:00 +02:00
Michael Aherne
7dfe4b92d0 MDL-33331 Strict warning in Shibboleth auth 2012-05-24 13:04:21 +01:00