Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Changelog

5.1.3 - 2025-09-01
- Security hardening

5.1.2 - 2025-07-07
- Textual changes

Expand Down
10 changes: 5 additions & 5 deletions Queue/Backend/MySQL.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function appendValuesToList($key, $values)
{
$table = $this->makePrefixedKeyListTableName($key);

$query = sprintf('INSERT INTO %s (`list_value`) VALUES (?)', $table);
$query = sprintf('INSERT INTO `%s` (`list_value`) VALUES (?)', $table);
foreach ($values as $value) {
if (empty($value)) {
continue;
Expand Down Expand Up @@ -143,7 +143,7 @@ public function getFirstXValuesFromList($key, $numValues)
}

$table = $this->makePrefixedKeyListTableName($key);
$sql = sprintf('SELECT SQL_NO_CACHE list_value FROM %s ORDER BY idqueuelist ASC LIMIT %d OFFSET 0', $table, (int)$numValues);
$sql = sprintf('SELECT SQL_NO_CACHE list_value FROM `%s` ORDER BY idqueuelist ASC LIMIT %d OFFSET 0', $table, (int)$numValues);

try {
$values = Db::fetchAll($sql);
Expand Down Expand Up @@ -172,7 +172,7 @@ public function hasAtLeastXRequestsQueued($key, $numValuesRequired)
}

$table = $this->makePrefixedKeyListTableName($key);
$sql = sprintf('SELECT SQL_NO_CACHE idqueuelist FROM %s LIMIT %d', $table, (int)$numValuesRequired);
$sql = sprintf('SELECT SQL_NO_CACHE idqueuelist FROM `%s` LIMIT %d', $table, (int)$numValuesRequired);

try {
$values = Db::fetchAll($sql);
Expand All @@ -194,7 +194,7 @@ public function removeFirstXValuesFromList($key, $numValues)
}

$table = $this->makePrefixedKeyListTableName($key);
$sql = sprintf('DELETE FROM %s ORDER BY idqueuelist ASC LIMIT %d', $table, (int)$numValues);
$sql = sprintf('DELETE FROM `%s` ORDER BY idqueuelist ASC LIMIT %d', $table, (int)$numValues);

try {
Db::query($sql);
Expand All @@ -210,7 +210,7 @@ public function removeFirstXValuesFromList($key, $numValues)
public function getNumValuesInList($key)
{
$table = $this->makePrefixedKeyListTableName($key);
$sql = sprintf('SELECT SQL_NO_CACHE max(idqueuelist) - min(idqueuelist) as num_entries FROM %s', $table);
$sql = sprintf('SELECT SQL_NO_CACHE max(idqueuelist) - min(idqueuelist) as num_entries FROM `%s`', $table);
try {
$value = Db::fetchOne($sql);
if ($value === null || $value === false) {
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "QueuedTracking",
"version": "5.1.2",
"version": "5.1.3",
"description": "Scale your large traffic Matomo service by queuing tracking requests in Redis or MySQL for better performance and reliability when experiencing peaks.",
"theme": false,
"keywords": ["tracker", "tracking", "queue", "redis"],
Expand Down