Skip to content

Commit 5788f37

Browse files
committed
v1.1.2 Bugfix
1 parent 20c1d2a commit 5788f37

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

app.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const _cliProgress = require('cli-progress');
4545
const {
4646
response
4747
} = require('express');
48-
const version = "v1.1.1";
48+
const version = "v1.1.2";
4949
const ftpd = require("./ftpd.js");
5050
var ftpserver;
5151

@@ -117,7 +117,7 @@ const download = (url, filename, callback) => {
117117
}
118118

119119
function isAuth(hash) {
120-
authsucc = false;
120+
var authsucc = false;
121121
cfg = fs.readFileSync("./config.json");
122122
cfg = JSON.parse(cfg);
123123
if (cfg.auth == false || hash == crypto.createHash('md5').update(cfg["auth-password"]).digest('hex')) {
@@ -155,12 +155,12 @@ request_lib.get("https://api.github.com/repos/Seeroy/kubek-minecraft-dashboard/r
155155
};
156156
app.use(function (req, res, next) {
157157
if (typeof (req.cookies) !== "undefined" && typeof(req.cookies["__auth__"]) !== "undefined") {
158-
authsucc = isAuth(req.cookies["__auth__"]);
158+
var is_authsucc = isAuth(req.cookies["__auth__"]);
159159
if (req["_parsedUrl"].pathname == "/login.html") {
160-
authsucc = true;
160+
is_authsucc = true;
161161
}
162162
}
163-
if (authsucc == true || path.extname(req["_parsedUrl"].pathname) == ".js" || path.extname(req["_parsedUrl"].pathname) == ".png" || path.extname(req["_parsedUrl"].pathname) == ".css") {
163+
if (is_authsucc == true || path.extname(req["_parsedUrl"].pathname) == ".js" || path.extname(req["_parsedUrl"].pathname) == ".png" || path.extname(req["_parsedUrl"].pathname) == ".css") {
164164
if (fs.existsSync(path.join(__dirname, "./www/" + req["_parsedUrl"].pathname))) {
165165
if (req["_parsedUrl"].pathname == "/") {
166166
req["_parsedUrl"].pathname = "/index.html";

0 commit comments

Comments
 (0)