Coder Social home page Coder Social logo

express-brute-loki's Introduction

Requarks Logo Requarks

License Build Status Codacy Badge Codacy Badge Dependency Status GitHub release Documentation Gitter

Requests and Bugs Tracking Management System

Under development

Milestones
  • Base Layout
  • Setup
  • Dashboard
    • Rotating backgrounds
    • Stats
    • Todos
    • Pinned
    • Active Projects
  • Global Search
  • Create
    • Category selection screen
    • Request
    • Attachments
  • Review
    • List view
    • Filters
    • Search
  • Item
  • Projects
    • Project
    • Sprints
    • Create Project
    • Edit Project
    • Add Teams / Members
  • Teams
    • Team
    • Create Team
    • Edit Team
    • Add Team Members
  • Settings
    • Profile
    • Avatar
    • Preferences
    • Notifications
  • Administration

express-brute-loki's People

Contributors

ngpixel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

express-brute-loki's Issues

moment not required

There is no require for the moment library used at 79:24

lifetime = lifetime ? moment().add(lifetime, 'seconds').toDate() : undefined;

Adding the following fixes it:

moment = require('moment');

Moreover this line should became like this to avoid a warning:

lifetime = lifetime ? moment().add(lifetime, 'seconds').toDate() : undefined;

value.lastRequest.getTime is not a function

Unsure what's causing this, but occurs when handling requests with this module. Confirmed the expected behaviour when using express-brute with MemoryStore().

TypeError: value.lastRequest.getTime is not a function
    at .<anonymous> (/home/xxx/node_modules/express-brute/index.js:100:47)
    at LokiStore.get (/home/xxx/node_modules/express-brute-loki/lib/express-brute-loki.js:111:3)
    at .<anonymous> (/home/xxx/node_modules/express-brute/index.js:82:15)
    at keyFunc (/home/xxx/node_modules/express-brute/index.js:39:41)
    at .<anonymous> (/home/xxx/node_modules/express-brute/index.js:47:3)
    at Layer.handle [as handle_request] (/home/xxx/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/xxx/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/home/xxx/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/home/xxx/node_modules/express/lib/router/layer.js:95:5)
    at /home/xxx/node_modules/express/lib/router/index.js:281:22

Code:

var store = new ExpressBruteLokiStore({
  path: './brute.db'
});
//var store = new ExpressBrute.MemoryStore(); // stores state locally, don't use this in production 
var bruteforce = new ExpressBrute(store);

app.post('/auth',
    bruteforce.prevent, // error 429 if we hit this route too often 
    function (req, res, next) {
        res.send('Success!');
    }
);

ReferenceError: sid is not defined

At line 81 sid there is an error:

let s = this.collection.find({ sid });

should probably became like this:

let s = this.collection.find({ sid: key });

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.