aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPitu <[email protected]>2017-01-30 05:10:39 -0300
committerPitu <[email protected]>2017-01-30 05:10:39 -0300
commit418f4ffe7931b1d661cbdf8b8e58b7d0261d4469 (patch)
tree6e3442b3931cad03b15119d035a1f44768531547
parentAdded enableUserAccounts (diff)
downloadhost.fuwn.me-418f4ffe7931b1d661cbdf8b8e58b7d0261d4469.tar.xz
host.fuwn.me-418f4ffe7931b1d661cbdf8b8e58b7d0261d4469.zip
Stuff
-rw-r--r--controllers/uploadController.js4
-rw-r--r--pages/home.html6
-rw-r--r--pages/panel.html2
3 files changed, 7 insertions, 5 deletions
diff --git a/controllers/uploadController.js b/controllers/uploadController.js
index 6b398cc..f9abf50 100644
--- a/controllers/uploadController.js
+++ b/controllers/uploadController.js
@@ -32,7 +32,9 @@ uploadsController.upload = function(req, res, next){
if(config.private === true)
if(token === undefined) return res.status(401).json({ success: false, description: 'No token provided' })
- // Let's see if it's a valid token
+ // If there is no token then just leave it blank so the query fails
+ if(token === undefined) token = ''
+
db.table('users').where('token', token).then((user) => {
let userid
if(user.length > 0)
diff --git a/pages/home.html b/pages/home.html
index 43a3e2c..256c856 100644
--- a/pages/home.html
+++ b/pages/home.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
- <title>loli-safe - A self hosted upload service</title>
+ <title>loli-safe - A small safe worth protecting.</title>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.3.0/css/bulma.min.css">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css">
<link rel="stylesheet" type="text/css" href="/css/style.css">
@@ -27,7 +27,7 @@
<div class="column" id='uploadContainer'>
<p id='tokenContainer' class="control has-addons has-addons-centered">
- <input id='token' class="input is-danger" type="text" placeholder="Your upload token">
+ <input id='token' class="input is-danger" type="text" placeholder="Your token">
<a id='tokenSubmit' class="button is-danger">Check</a>
</p>
@@ -48,7 +48,7 @@
</div>
<h3 id="links">
- <a href="https://github.com/kanadeko/loli-safe" target="_blank" class="is-danger">View on Github</a><span>|</span><a href="https://chrome.google.com/webstore/detail/loli-safe-uploader/enkkmplljfjppcdaancckgilmgoiofnj" target="_blank" class="is-danger">Chrome extension</a><span>|</span><a href="/panel" target="_blank" class="is-danger">Dashboard</a>
+ <a href="https://github.com/kanadeko/loli-safe" target="_blank" class="is-danger">View on Github</a><span>|</span><a href="https://chrome.google.com/webstore/detail/loli-safe-uploader/enkkmplljfjppcdaancckgilmgoiofnj" target="_blank" class="is-danger">Chrome extension</a><span>|</span><a href="/auth" target="_blank" class="is-danger">Manage your uploads</a>
</h3>
</div>
diff --git a/pages/panel.html b/pages/panel.html
index 68443a2..a0860cc 100644
--- a/pages/panel.html
+++ b/pages/panel.html
@@ -53,7 +53,7 @@
</ul>
<p class="menu-label">Administration</p>
<ul class="menu-list">
- <li><a id="itemTokens" onclick="panel.changeTokens()">Change your tokens</a></li>
+ <li><a id="itemTokens" onclick="panel.changeTokens()">Change your token</a></li>
<li><a onclick="panel.logout()">Logout</a></li>
</ul>
</aside>