22 Commits

Author SHA1 Message Date
Eric Merrill
774c00c740 MDL-47000 session: Update memcached version referecnes to 2.2.0 2015-02-24 15:18:15 -05:00
Andrew Nicols
57996fe956 MDL-44642 session: Add a client-side session keepalive system
For pages where there will be significant user interaction in which the
server is not updated, it may be necessary to poll the server periodically
to touch the session.

This makes use of the existing checknet script which was designed for
checking network connectivity but fits into this use-case reasonably well.
2014-12-16 08:32:46 +08:00
Petr Skoda
89e9321f96 MDL-47834 auth: Allow enforcing of login limits 2014-11-21 10:00:01 +13:00
Petr Skoda
866f03de46 MDL-47800 auth: Add option to logout on pw change 2014-11-18 09:51:52 +13: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
Damyon Wiese
aba9019832 Merge branch 'wip_MDL-46711_m28_memcachesrvs' of https://github.com/skodak/moodle 2014-08-19 16:31:06 +08:00
Eloy Lafuente (stronk7)
652d886ae5 Merge branch 'wip_MDL-46552_m28_memcached' of https://github.com/skodak/moodle 2014-08-19 02:28:56 +02:00
Petr Skoda
e8b52671ae MDL-46711 session: add support for multiple servers to memcache session driver
Includes proper definition of object properties which fixes handling of timout default.
2014-08-07 15:39:27 +12:00
Petr Skoda
c6b5f18d06 MDL-46561 session: use full session validation in \core\session\manager::session_exists() 2014-08-07 08:59:24 +12:00
Petr Skoda
fcbf5cbb01 MDL-46552 session: add support for multiple servers in memcached session driver 2014-08-05 11:34:57 +12:00
Petr Skoda
2e00d01db4 MDL-46099 session: fix use of references for session globals
This reverses the references used for global $USER and $SESSION,
the reason is that PHP does not allow references to references.
$USER is a reference to $GLOBALS['USER'] which means we cannot
put any references to it. Solution is to store the current user and session
objects in $GLOBALS['USER'] and $GLOBALS['SESSIOn'] are reference
them in $_SESSION.

This patch makes the session code behave the same way in CLI,
phpunit and normal web requests - this allows use to finally
unit test most aspects of the session code in Moodle.
2014-07-01 08:38:00 +12:00
sam marshall
f2faa7cd17 MDL-45260 Memcache session support does not work for multiple servers 2014-04-24 12:49:15 +01:00
sam marshall
e645b4d580 MDL-43975 Sessions: Should support memcache, not just memcached
This commit adds a session handler which works using memcache (without
requiring the memcached extension), similar to the support for
memcache within MUC.

This may be less reliable than memcached but we have been using a
similar approach on our system without problems. In case, I added a
warning in config-dist.php.
2014-04-01 13:34:50 +01:00
Sam Hemelryk
a59a423926 Merge branch 'MDL-42084-master' of git://github.com/sammarshallou/moodle 2013-12-03 11:12:34 +13:00
Damyon Wiese
cc9651dcae Merge branch 'm27_MDL-43039_SessionDiskFull_False_Positive' of https://github.com/scara/moodle 2013-12-02 14:37:22 +08:00
Matteo Scaramuccia
35897a5223 MDL-43039 Libraries "The session partition is full." false positive. 2013-11-30 14:36:58 +01:00
Petr Škoda
226991e9fe MDL-43106 fix double cookies on first access 2013-11-29 15:47:16 +08:00
sam marshall
3ef7279f26 MDL-42084 Core: Change set_time_limit to core_php_time_limit::raise everywhere
Exceptions (places where set_time_limit is still left) are:

Third-party libraries:
  ADODB
  PHPMailer

Moodle core:
  PHPUnit - not relevant (CLI mode)
2013-11-06 16:40:01 +00:00
Petr Škoda
6ec361c6bc MDL-42485 add session lock acquire timeout to memcached session driver
Credit goes to Eric Merrill, thanks!
2013-10-27 16:05:12 +01:00
Petr Škoda
38fc013025 MDL-42040 refactor core Moodle shutdown handlers logic 2013-10-04 11:36:46 +02:00
Petr Škoda
de230fd359 MDL-37324 fix phpunit and behat SESSION and USER setup 2013-09-24 08:59:29 +02: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