Pitu 7 years ago
parent
commit
418f4ffe79
3 changed files with 7 additions and 5 deletions
  1. 3 1
      controllers/uploadController.js
  2. 3 3
      pages/home.html
  3. 1 1
      pages/panel.html

+ 3 - 1
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)

+ 3 - 3
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>

+ 1 - 1
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>