← Back to team overview

mahara-contributors team mailing list archive

[Bug 1939359] A change has been merged

 

Reviewed:  https://reviews.mahara.org/11914
Committed: https://git.mahara.org/mahara/mahara/commit/4529338b1a00a0bf63e6fc99741a5912e08aa49b
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch:    21.04_STABLE

commit 4529338b1a00a0bf63e6fc99741a5912e08aa49b
Author: Ghada El-Zoghbi <ghada@xxxxxxxxxxxxxxx>
Date:   Tue Aug 10 13:44:47 2021 +1000

Bug #1939359: fix SQL syntax error in LDAP sync

behatnotneeded

Change-Id: I04ebc9d92e61938dd1282d115925208ca81e8704
(cherry picked from commit 2c747ce3fbc902cf856caec7e3b5d5504364f011)

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1939359

Title:
  LDAP Sync: Error with Adding

Status in Mahara:
  Fix Committed
Status in Mahara 20.04 series:
  Fix Committed
Status in Mahara 20.10 series:
  Fix Committed
Status in Mahara 21.04 series:
  Fix Committed
Status in Mahara 21.10 series:
  Fix Committed

Bug description:
  Mahara: 20.10.1
  OS: Linux
  DB: Postgres (or MySQL)
  Browser: Any 

  
  I just discovered an error that I actually introduced!! I do beg your pardon.

  In the LDAP sync - htdocs/auth/ldap/lib.php::sync_users(), the
  following query actually has a syntax error!! It results in this call
  stack:

  Aug  8 00:05:04 08a80cd1bd91 ecs_mahara_prod: Call stack (most recent first):
  Aug  8 00:05:04 08a80cd1bd91 ecs_mahara_prod: * get_recordset_sql(string(size 498)) at /var/www/site/auth/ldap/lib.php:1352
  Aug  8 00:05:04 08a80cd1bd91 ecs_mahara_prod: * AuthLdap->sync_users() at /var/www/site/auth/ldap/lib.php:1692
  Aug  8 00:05:04 08a80cd1bd91 ecs_mahara_prod: * PluginAuthLdap::auth_ldap_sync_cron() at /var/www/site/lib/mahara.php:1819
  Aug  8 00:05:04 08a80cd1bd91 ecs_mahara_prod: * call_static_method(string(size 14), string(size 19)) at /var/www/site/lib/cron.php:119

  
  The query in question is the following:

                  $sql = '
                          SELECT
                              e.extusername,
                              e.firstname,
                              e.lastname,
                              e.email,
                              e.studentid,
                              e.preferredname
                          FROM
                              {auth_ldap_extusers_temp} e
                              " . $sjoinsql . "
                          WHERE u.id IS NULL
                          ORDER BY e.extusername';

  The problem is that the string `$sjoinsql` doesn't exist and the
  quotes are all wrong.

  I'm so sorry.. I'll get a fix soon.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1939359/+subscriptions



References