1457 Commits

Author SHA1 Message Date
Andrew Nicols
cc54b4e78a
MDL-81520 core: Fix test finality 2024-12-11 12:30:21 +08:00
Andrew Nicols
3bd5f52e22
MDL-81521 core: Update all possibly data providers to be static
Note: Some data providers could not be automatically be converted to
being static. These will be handled in a separate issue.
2024-11-19 09:30:51 +08:00
Paul Holden
7d2988dfe5 MDL-76962 auth_oauth2: users can only delete their own linked logins. 2024-08-29 10:32:41 +08:00
Paul Holden
b14cfb6d1b
MDL-82328 auth_oauth2: don't load custom profile field data too early.
By prematurely loading custom profile data in the constructor, under
specific circumstances it would happen before the page was fully
initialised which meant that any attempt at applying filters when
formatting profile field data would result in thrown exception.
2024-07-08 08:56:01 +01:00
Huong Nguyen
0cd42e33bf
Merge branch 'MDL-81351-403-enfix' of https://github.com/mudrd8mz/moodle into MOODLE_403_STABLE 2024-04-10 13:55:26 +07:00
Juan Leyva
5e7440acdc MDL-81405 session: New core cookie helper utility class 2024-04-06 12:25:51 +02:00
Jake Dallimore
8657868c97
MDL-79712 auth_lti: ensure MoodleSession uses SameSite=None Secure
The MoodleSession cookie is already set this way when using Chrome, but
not for Firefox. This is a decision made in \core\session\manager. When
Firefox eventually defaults to SameSite=Lax when the SameSite attribute
is omitted from the Set-Cookie headers, the MoodleSession cookie won't
be sent. This change ensures the cookies used during LTI launches will
continue to work if/when this happens, and despite any changes which may
be made to core's sessionlib in future.
2024-04-02 11:40:17 +08:00
Helen Foster
3fdae1298f MDL-81351 lang: Import fixed English strings (en_fix) 2024-03-28 10:58:24 +01:00
Jake Dallimore
fff106ffc2
MDL-80835 auth_lti: fix bad cast breaking samesite LTI usage 2024-03-21 15:37:38 +08:00
Jake Dallimore
d95a5de2ac
MDL-80835 auth_lti: add partitioning to post-auth MoodleSession cookie
Adds the property that is required by Chrome to opt-in to its 3rd party
cookie partitioning solution, CHIPS. This specific change to auth_lti is
to ensure the MoodleSession Set-Cookie header resulting from
complete_user_login() calls (in auth.php) have this property set.
2024-03-21 15:37:37 +08:00
Jake Dallimore
1e09e6ffa6
MDL-80835 auth_lti: add cookie helper facilitating CHIPS opt-in
To opt a cookie in to Chrome's 3rd party cookie partitioning solution,
CHIPS, the property 'Partitioned;' needs to be set. This adds a helper
class supporting this, for a given cookie(s).

Note also, PHP's native
cookie APIs (setcookie, etc) don't support this cookie property yet -
(https://github.com/php/php-src/issues/12646).

Since this class is intended to allow existing Set-Cookie headers to be
modified before being sent (e.g. allowing clients to set a property on a
cookie set elsewhere in code), it deals with the headers directly anyway
but it means that new cookies must also use this helper to opt-in,
instead of relying on setcookie(). E.g. where the intent is to add
partitioning support to a new cookie, that cookie must first be set
(setcookie) and then it may opt-in to partitioning via this helper;
partitioning support cannot be achieved directly through setcookie and
friends yet.
2024-03-21 15:37:36 +08:00
Jake Dallimore
194baa7436
MDL-80836 auth_lti: take user through login instead of sesspiggyback
Browsers are phasing out 3rd party cookies. Those which can be set are
partitioned to the top level embedding site, so piggybacking is
prevented. This will break the account linking process. This fix swaps
the piggyback for a login round trip, as originally intended, which
resolves the issue.
2024-02-15 10:37:39 +08:00
Jake Dallimore
796935efc2
MDL-78219 auth_lti: ensure user updates happen after authentication
If an existing session is active at the time of launch, that user id
appears in the user_updated log. This log should show the launching user
updating their own record, not someone else. To resolve this, auth the
user before making any record updates so that the event gets the correct
user id.
2024-01-15 15:44:24 +08:00
Jake Dallimore
a58f004545
MDL-78219 auth_lti: force empty session before launch user creation
If an existing session is active at the time of launch, that user id
appears in the user_created log, incorrectly (it should be system/0).
This patch makes sure that any existing session is terminated before
creation of a new user during launches.
2024-01-15 15:44:24 +08:00
Paul Holden
ca991dbe29
MDL-78849 user: correct logical operator behaviour for guest button.
Apart from being banned per MDL-74990, it causes a subtle bug here
due to operator precedence.

Co-authored-by: Tom Mayfield <tmayfield@costrack.com>
2023-11-16 11:31:49 +00:00
Jun Pataleta
2b5073a222
MDL-79626 upgrade: add the 4.3.0 separation line to all upgrade scripts 2023-10-11 09:40:13 +08:00
Sara Arjona
9877a06246
Merge branch 'MDL-79551-master-rc' of https://github.com/junpataleta/moodle 2023-10-04 12:28:14 +02:00
Jun Pataleta
d5d7835a0a
MDL-79551 versions: Make CiBoT happy
* Use array short syntax for $plugin->dependencies
* Add trailing comma for multi-line $plugin->dependencies array
2023-10-04 14:04:29 +08:00
Jun Pataleta
94bc2cd38b
MDL-79551 versions: bump all versions and requires near release 2023-10-04 13:57:17 +08:00
meirzamoodle
0adb58ec9c MDL-78969 oauth2: remove auto-login after successful confirmation
With the new flow, users can go to the login page from the confirmed page,
and if the user successfully logs in, the user will be directed to the confirmed page.
To avoid that, the confirmed page can only be seen by users who are not logged in.
2023-10-04 01:24:19 +00:00
Sara Arjona
458172696f
Merge branch 'MDL-79511-master' of https://github.com/meirzamoodle/moodle 2023-09-28 16:15:47 +02:00
Meirza
5dd79c7781 MDL-79511 auth: Avoid errors on the dynamic properties creation
Currently, Moodle uses fetchOBject() from ADOdb to get the table columns.
Sadly, the current ADOdb, especially the fetchObject() function, still creates dynamic properties.
Altering the fetchObject() with fetchRow() to avoid the dynamic properties deprecation error on PHP 8.2
2023-09-27 16:43:15 +07:00
Sara Arjona
cc9430929d
MDL-77708 docs: Update references from docs.moodle.org/dev 2023-09-26 10:30:19 +02:00
Jun Pataleta
1eb8ee32bb
MDL-78806 core: Remove redundant site name
MDL-78806 core: Remove redundant site name on page titles

* With the site name now being appended to the page titles, there
is no need to manually append the page titles.
2023-09-09 08:58:54 +08:00
Jun Pataleta
29ec472284
Merge branch 'MDL-53368-master-3' of https://github.com/HuongNV13/moodle 2023-08-24 22:51:26 +08:00
Huong Nguyen
0cd29afb6f
MDL-53368 core_auth: Implement reCaptcha on login page 2023-08-24 15:18:31 +07:00
Cameron Ball
230fcddd62 MDL-78630 auth: Display lock/unlock messages 2023-08-15 10:59:09 +08:00
meirzamoodle
3d3dd827fa
MDL-78685 auth_oauth2: Added logged-in status check 2023-08-10 18:32:23 +07:00
Jake Dallimore
c25857a73f
MDL-76842 auth_lti: remove redundant conditional logic and cast 2023-06-08 10:27:19 +08:00
Jake Dallimore
d9fbe7c866
MDL-76842 auth_lti: don't update the user unless data has changed
When receiving data from the LTI launch, or service call, only update
the user record when we know something has changed. This prevents the
creation of many \core\event\user_updated events.
2023-06-08 09:29:56 +08:00
Jake Dallimore
3208e7f182
MDL-76842 auth_lti: don't update the user after membership creation
This isn't required and generates excess events. The only thing update
does, other than update the user fields, is to update the picture, but
in this case, that's unset in membership-based auths anyway, so it's
entirely safe to remove this.
2023-06-08 09:29:56 +08:00
Jake Dallimore
dd507afe4b
MDL-76842 auth_lti: test confirming the erroneous user_updated events
This test will fail until the fix - only updating users when data has
changed - is put in place in the following commit.
2023-06-08 09:29:56 +08:00
Meirza
684343eee7 MDL-77350 auth: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-16 01:03:01 +07:00
Paul Holden
029474c319
MDL-70189 lang: final removal of deprecated 311 strings. 2023-05-04 14:15:35 +01:00
Jun Pataleta
9095bb0ef9 MDL-78000 upgrade: add the 4.2.0 separation line to all upgrade scripts 2023-04-22 23:17:50 +08:00
Ilya Tregubov
1c25a0cc2f Merge branch 'MDL-77577-master' of https://github.com/andelacruz/moodle 2023-04-20 12:33:23 +08:00
Eloy Lafuente (stronk7)
061c9d7ba0 MDL-77940 versions: bump all versions and requires near release
version = 2023042400 release version
requires= 2023041800 current rc1 version
2023-04-18 18:08:09 +02:00
Marina Glancy
8fc1486d36 MDL-77164 various: fix incorrect phpdocs 2023-04-13 11:35:06 +01:00
Marina Glancy
4d765cd699 MDL-77164 privacy: typehint test content writer 2023-04-13 09:43:15 +01:00
Marina Glancy
9ffbcce0ac MDL-77164 various: fix mustache template name 2023-04-13 09:43:15 +01:00
Angelia Dela Cruz
374b6d8e0e MDL-77577 Behat: Replaced the use of "Install selected language pack(s)
Evaluated usage of "Install selected language pack(s)" in Behat and
replaced the steps to use generator to install language packs as part
of test setup.
2023-03-21 11:58:30 +08:00
Mathew May
e5ca7766e7 MDL-52805 core: Remove legacy log calls 2023-03-07 13:08:46 +08:00
Andrew Nicols
8fb8bfaf35 MDL-77007 auth: Remove auth-yui-passwordunmask
This was used as part of the auth_config.php configuration system for
the auth subsystem, which was deprecated in Moodle 3.3.

It has never had any other uses in core.

Whilst it would be ideal to deprecate it by replacing with an
alternative, it would be impossible to test.
2023-01-25 14:14:15 +08:00
Andrew Nicols
6a5512c999 MDL-77007 admin: Remove deprecated auth_config.php usage
This was deprecated in Moodle 3.3 and should now be removed.
2023-01-25 14:13:59 +08:00
Jun Pataleta
fad05d7929 Merge branch 'MDL-76583-master-withoutrename' of https://github.com/andrewnicols/moodle 2023-01-19 09:44:48 +08:00
Andrew Nicols
a3cc26f8bb MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +08:00
Sara Arjona
d62f6ae036 Merge branch 'MDL-61789-master' of https://github.com/meirzamoodle/moodle 2023-01-16 17:08:38 +01:00
David Mudrák
50ba9dc72c MDL-76739 lang: Use the fixed strings in the tests, too 2023-01-12 09:17:27 +08:00
Helen Foster
975a127325 MDL-76739 lang: Import fixed English strings (en_fix) 2023-01-12 09:17:27 +08:00
Meirza
b79231361b MDL-61789 auth_oauth2: Update profile fields based on data mapping.
After the user creation, the system must call an update function to update profile_fields_*.
We also provided two functions into user/profile/lib.php to get available from other areas.
We added PHP unit testing for new public functions and
the Behat tests for custom profile fields with locked and unlocked statuses.

Co-authored-by: Matt Porritt <matt.porritt@moodle.com>
2023-01-07 20:59:26 +07:00