Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Commit

Permalink
Don't load init.js; it's already been done by anything that loads
Browse files Browse the repository at this point in the history
this script.
  • Loading branch information
echicken committed Jan 16, 2018
1 parent 6ab1aff commit b8558c0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions web/lib/auth.js
@@ -1,5 +1,4 @@
load('sbbsdefs.js');
load(system.exec_dir + '../web/lib/init.js');

function randomString(length) {
var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'.split("");
Expand Down Expand Up @@ -89,7 +88,7 @@ function destroySession(cookies) {
var cookie = cookies[c].split(',');

try {

var usr = new User(cookie[0]);
if(usr.number < 1) {
throw 'Invalid user number ' + cookie[0] + ' in cookie.';
Expand Down Expand Up @@ -140,7 +139,7 @@ function authenticate(alias, password) {
}

// If someone is trying to log in
if (typeof http_request.query.username !== 'undefined' &&
if (typeof http_request.query.username !== 'undefined' &&
http_request.query.username[0].length <= LEN_ALIAS &&
typeof http_request.query.password != 'undefined' &&
http_request.query.password[0].length <= LEN_PASS
Expand Down

0 comments on commit b8558c0

Please sign in to comment.