From 309cd40da2973d0c56e96f1badab8a68b056c9f0 Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Tue, 21 Mar 2017 19:47:31 -0700 Subject: [PATCH] Compare owner name case-insensitively when deleting channel --- package.json | 2 +- src/web/account.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2f4b4e0a..878ae4f1 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Calvin Montgomery", "name": "CyTube", "description": "Online media synchronizer and chat", - "version": "3.34.4", + "version": "3.34.5", "repository": { "url": "http://github.com/calzoneman/sync" }, diff --git a/src/web/account.js b/src/web/account.js index 2b0e0479..ed62a09c 100644 --- a/src/web/account.js +++ b/src/web/account.js @@ -325,7 +325,7 @@ function handleDeleteChannel(req, res) { return; } - if (channel.owner !== req.user.name && req.user.global_rank < 255) { + if ((!channel.owner || channel.owner.toLowerCase() !== req.user.name.toLowerCase()) && req.user.global_rank < 255) { db.channels.listUserChannels(req.user.name, function (err2, channels) { sendPug(res, "account-channels", { channels: err2 ? [] : channels,