From e08e36e7e25d4429a95b6807a5eb4f887d1240d8 Mon Sep 17 00:00:00 2001 From: Colon <56617416+GDColon@users.noreply.github.com> Date: Sat, 3 Oct 2020 22:01:14 -0400 Subject: [PATCH] Fixed stupidity --- api/download.js | 2 +- api/level.js | 2 +- classes/Level.js | 4 ++-- html/filters.html | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/download.js b/api/download.js index e377b46..c6990a3 100644 --- a/api/download.js +++ b/api/download.js @@ -54,7 +54,7 @@ module.exports = async (app, req, res, api, ID, analyze) => { level.songName = songData[2] || "Unknown" level.songAuthor = songData[4] || "Unknown" level.songSize = (songData[5] || "0") + "MB" - level.songID = songData[1] || level.customSong + level.songID = songData[1] || String(level.customSong) if (!songData[2]) level.invalidSong = true } diff --git a/api/level.js b/api/level.js index 49a00e3..39eb07e 100644 --- a/api/level.js +++ b/api/level.js @@ -46,7 +46,7 @@ module.exports = async (app, req, res, api, analyze) => { level.songName = song[2] || "Unknown" level.songAuthor = song[4] || "Unknown" level.songSize = (song[5] || "0") + "MB" - level.songID = song[1] || level.customSong + level.songID = song[1] || String(level.customSong) } else { diff --git a/classes/Level.js b/classes/Level.js index df55b11..9b4d430 100644 --- a/classes/Level.js +++ b/classes/Level.js @@ -50,9 +50,9 @@ class Level { if (this.password && this.password != 0) { let xor = new XOR(); - let pass = config.xorPasswords ? +xor.decrypt(this.password, 26364) : this.password; + let pass = config.xorPasswords ? xor.decrypt(this.password, 26364) : this.password; if (pass.length > 1) this.password = pass.slice(1); - else this.password = +pass; + else this.password = pass; } } } diff --git a/html/filters.html b/html/filters.html index 6bef5ed..cd3ff3f 100644 --- a/html/filters.html +++ b/html/filters.html @@ -116,7 +116,7 @@ let demons = [] let demonMode = false; $('#userSearch').click(function() { - let query = encodeURIComponent($('#levelName').val()) + let query = encodeURIComponent($('#levelName').val()).replace(/%2F/gi, "") if (query) window.location.href = "./u/" + query })