Giter Club home page Giter Club logo

piwik-usersmanagerencrypted's People

Contributors

joey3000 avatar

Watchers

 avatar

piwik-usersmanagerencrypted's Issues

Use constant-time password string comparison

"Salting" passwords before encryption

The missing but crucial feature is "salting" passwords before encryption. The salt does not need to be secret, it only needs to have a defined limited validity time, and to be known to both, the client and the server. For UsersManagementEncrypted, the PHP session ID would fit, but can't be accessed from client-side JavaScript (and it shouldn't). I would need to find a work-around for UsersManagementEncrypted. Like sending a nonce or a strong hash of the session ID to the page, or something.)

P.S.: The reason for the need to salt is that, as of now, encrypted passwords can be used in replay attacks. Similarly to a pass-the-hash attack, but passing the encrypted password.

For the LoginEncrypted plugin, see Joey3000/piwik-LoginEncrypted#1.

Add "use strict" to JavaScript functions

As good coding practice, add use strict to all JavaScript functions added or modified by me for this plugin. (The ones not modified by me should stay equal to the original Piwik code.) I.e., in:

Infos:

But caution! It must be done in functions only, not on the file level. Because in Piwik, all plugin JS is concatenated, which would make use strict apply to all concatenated files. From the above Mozilla link:

Consider concatenating a strict mode script with a non-strict mode script: the entire concatenation looks strict! [...] It is thus recommended that you enable strict mode on a function-by-function basis (at least during the transition period).

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.