Skip to content

Node.js based forum software built for the modern web

fix: don't allow guests to accept/reject/edit queued guests posts

Barış Soner Uşaklıa481c8a64139
diff --git a/src/posts/queue.js b/src/posts/queue.js
index 52a94be434..b1eea062f4 100644
--- a/src/posts/queue.js
+++ b/src/posts/queue.js
@@ -447,6 +447,9 @@ module.exports = function (Posts) {
};
Posts.canEditQueue = async function (uid, editData, action) {
+ if (!utils.isNumber(uid) || !(parseInt(uid, 10) > 0)) {
+ return false;
+ }
const [isAdminOrGlobalMod, data] = await Promise.all([
user.isAdminOrGlobalMod(uid),
getParsedObject(editData.id),