mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
MDL-81897 tool_mobile: Force partitioned cookies on inapp browser
This commit is contained in:
parent
462d5f04a8
commit
d963e2ed0e
@ -75,6 +75,11 @@ if (empty($SESSION->justloggedin) &&
|
||||
throw new moodle_exception('pluginnotenabledorconfigured', 'tool_mobile');
|
||||
}
|
||||
|
||||
// If the user is using the inapp (embedded) browser, we need to set the Secure and Partitioned attributes to the session cookie.
|
||||
if (\core_useragent::is_moodle_app()) {
|
||||
\core\session\utility\cookie_helper::add_attributes_to_cookie_response_header('MoodleSession'.$CFG->sessioncookie, ['Secure', 'Partitioned']);
|
||||
}
|
||||
|
||||
require_login(0, false);
|
||||
|
||||
// Require an active user: not guest, not suspended.
|
||||
|
Loading…
x
Reference in New Issue
Block a user