summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--schema.sql1
-rw-r--r--server.js3
2 files changed, 0 insertions, 4 deletions
diff --git a/schema.sql b/schema.sql
index 4967797..735fa93 100644
--- a/schema.sql
+++ b/schema.sql
@@ -1,6 +1,5 @@
-- Blacklists --
-create table if not exists blacklist_ip ( ip text primary key ) without rowid;
create table if not exists blacklist_mail ( mail text primary key ) without rowid;
-- Titles --
diff --git a/server.js b/server.js
index b38c368..5d97417 100644
--- a/server.js
+++ b/server.js
@@ -224,7 +224,6 @@ function get_avatar(mail) {
* USER AUTHENTICATION
*/
-const SQL_BLACKLIST_IP = SQL("SELECT EXISTS ( SELECT 1 FROM blacklist_ip WHERE ip=? )").pluck();
const SQL_BLACKLIST_MAIL = SQL("SELECT EXISTS ( SELECT 1 FROM blacklist_mail WHERE ? LIKE mail )").pluck();
const SQL_EXISTS_USER_NAME = SQL("SELECT EXISTS ( SELECT 1 FROM users WHERE name=? )").pluck();
@@ -313,8 +312,6 @@ app.use(function (req, res, next) {
return res.redirect("/msie.html");
let ip = req.ip || req.connection.remoteAddress || "0.0.0.0";
res.setHeader('Cache-Control', 'no-store');
- if (SQL_BLACKLIST_IP.get(ip) === 1)
- return res.status(403).send('Sorry, but this IP has been banned.');
let sid = login_cookie(req);
if (sid) {
let user_id = login_sql_select.get(sid);