SQL statement missing space

Bug #1847750 reported by Matt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Unassigned
18.10
Fix Released
High
Unassigned
19.04
Fix Released
High
Unassigned
19.10
Fix Released
High
Unassigned

Bug Description

Hello,

There is a problem with the SQL syntax within htdocs/search/internal/lib.php (branch 18.10_STABLE > line 854). If $ltiwhere assigns on false, the query concatenates at line 862, but is missing a space after the 0.

To replicate:

- ensure the plugin module_lti is not installed
- navigate to /group/find.php (Can be accessed from the home page > Engage)

Looks like this bug was introduced here:

https://github.com/MaharaProject/mahara/commit/b078b3a848

Thanks,

Matt

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/10441

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/10441
Committed: https://git.mahara.org/mahara/mahara/commit/8857c1f6f14b69f4cf60f3a89caf24d71b649d59
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 8857c1f6f14b69f4cf60f3a89caf24d71b649d59
Author: Robert Lyon <email address hidden>
Date: Mon Oct 14 08:43:36 2019 +1300

Bug 1847750: Adding space in constructed sql query

To avoid sqashing 'AND' statement against previous bit

behatnotneeded

Change-Id: Ifac0c97c0c7d37e624c2fda574758b62132fc297
Signed-off-by: Robert Lyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "19.10_STABLE" branch: https://reviews.mahara.org/10487

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "19.04_STABLE" branch: https://reviews.mahara.org/10488

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "18.10_STABLE" branch: https://reviews.mahara.org/10489

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/10489
Committed: https://git.mahara.org/mahara/mahara/commit/7bcb5dd3ab924b49aafe0f8028c1d4871776cacf
Submitter: Robert Lyon (<email address hidden>)
Branch: 18.10_STABLE

commit 7bcb5dd3ab924b49aafe0f8028c1d4871776cacf
Author: Robert Lyon <email address hidden>
Date: Mon Oct 14 08:43:36 2019 +1300

Bug 1847750: Adding space in constructed sql query

To avoid sqashing 'AND' statement against previous bit

behatnotneeded

Change-Id: Ifac0c97c0c7d37e624c2fda574758b62132fc297
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 8857c1f6f14b69f4cf60f3a89caf24d71b649d59)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/10487
Committed: https://git.mahara.org/mahara/mahara/commit/25acff45499d47f5e505eb1bc69df64e5d85e0d5
Submitter: Robert Lyon (<email address hidden>)
Branch: 19.10_STABLE

commit 25acff45499d47f5e505eb1bc69df64e5d85e0d5
Author: Robert Lyon <email address hidden>
Date: Mon Oct 14 08:43:36 2019 +1300

Bug 1847750: Adding space in constructed sql query

To avoid sqashing 'AND' statement against previous bit

behatnotneeded

Change-Id: Ifac0c97c0c7d37e624c2fda574758b62132fc297
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 8857c1f6f14b69f4cf60f3a89caf24d71b649d59)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/10488
Committed: https://git.mahara.org/mahara/mahara/commit/34d32baa99fceee6e97d1d40ee74ea660c364b0d
Submitter: Robert Lyon (<email address hidden>)
Branch: 19.04_STABLE

commit 34d32baa99fceee6e97d1d40ee74ea660c364b0d
Author: Robert Lyon <email address hidden>
Date: Mon Oct 14 08:43:36 2019 +1300

Bug 1847750: Adding space in constructed sql query

To avoid sqashing 'AND' statement against previous bit

behatnotneeded

Change-Id: Ifac0c97c0c7d37e624c2fda574758b62132fc297
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 8857c1f6f14b69f4cf60f3a89caf24d71b649d59)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.