mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #12325
[Bug 1181108] [NEW] Make suspend_user() compatible with command-line scripts
Public bug reported:
While working on upstreaming the ldap sync plugin, I noticed that calls
to suspend_user() from a command-line script throw a warning:
[WAR] 8d (auth/session.php:329) session_start(): The session id is too long or contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,'
Call stack (most recent first):
* log_message("session_start(): The session id is too long or con...", 8, true, true, "/home/aaronw/www/mahara/htdocs/auth/session.php", 329) at /home/aaronw/www/mahara/htdocs/lib/errors.php:446
* error(2, "session_start(): The session id is too long or con...", "/home/aaronw/www/mahara/htdocs/auth/session.php", 329, array(size 10)) at Unknown:0
* session_start() at /home/aaronw/www/mahara/htdocs/auth/session.php:329
* remove_user_sessions("7") at /home/aaronw/www/mahara/htdocs/lib/user.php:1214
* suspend_user("7", "auth/ldap sync 1368772733 (17 May 2013, 6:38 PM)") at /home/aaronw/www/mahara/htdocs/auth/ldap/lib.php:1216
* AuthLdap->sync_users() at /home/aaronw/www/mahara/htdocs/auth/ldap/lib.php:1575
* PluginAuthLdap::auth_ldap_sync_cron() at Unknown:0
* call_user_func_array(array(size 2), array(size 0)) at /home/aaronw/www/mahara/htdocs/lib/mahara.php:1365
* call_static_method("PluginAuthLdap", "auth_ldap_sync_cron") at /home/aaronw/www/mahara/htdocs/lib/cron.php:96
Ultimately this is because command-line scripts don't have a sessionid,
and there is code in the function remove_user_sessions() (which any
current login sessions for a user, in order to boot them out
immediately) which depends on there being a sessionid.
** Affects: mahara
Importance: Low
Assignee: Aaron Wells (u-aaronw)
Status: In Progress
** Tags: cli ldapsync
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contrib members
https://bugs.launchpad.net/bugs/1181108
Title:
Make suspend_user() compatible with command-line scripts
Status in Mahara ePortfolio:
In Progress
Bug description:
While working on upstreaming the ldap sync plugin, I noticed that
calls to suspend_user() from a command-line script throw a warning:
[WAR] 8d (auth/session.php:329) session_start(): The session id is too long or contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,'
Call stack (most recent first):
* log_message("session_start(): The session id is too long or con...", 8, true, true, "/home/aaronw/www/mahara/htdocs/auth/session.php", 329) at /home/aaronw/www/mahara/htdocs/lib/errors.php:446
* error(2, "session_start(): The session id is too long or con...", "/home/aaronw/www/mahara/htdocs/auth/session.php", 329, array(size 10)) at Unknown:0
* session_start() at /home/aaronw/www/mahara/htdocs/auth/session.php:329
* remove_user_sessions("7") at /home/aaronw/www/mahara/htdocs/lib/user.php:1214
* suspend_user("7", "auth/ldap sync 1368772733 (17 May 2013, 6:38 PM)") at /home/aaronw/www/mahara/htdocs/auth/ldap/lib.php:1216
* AuthLdap->sync_users() at /home/aaronw/www/mahara/htdocs/auth/ldap/lib.php:1575
* PluginAuthLdap::auth_ldap_sync_cron() at Unknown:0
* call_user_func_array(array(size 2), array(size 0)) at /home/aaronw/www/mahara/htdocs/lib/mahara.php:1365
* call_static_method("PluginAuthLdap", "auth_ldap_sync_cron") at /home/aaronw/www/mahara/htdocs/lib/cron.php:96
Ultimately this is because command-line scripts don't have a
sessionid, and there is code in the function remove_user_sessions()
(which any current login sessions for a user, in order to boot them
out immediately) which depends on there being a sessionid.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1181108/+subscriptions
Follow ups
References