Giter Site home page Giter Site logo

hea-ws's People

Contributors

jajm avatar joubu avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hea-ws's Issues

Poorly random library-id

@PaulPoulain hi !

I started to look at the code of hea, and for my limited understanding of it, it seems that library-id could be enumerated too easily.

When a library post data for the first time, it don't provide library-id, and hea-ws generate a new one, returned to the library.

But the algorithm used for the library-id is poorly randomized: it is the hash of:

  • the library-name : provided by the library, by default empty, and if customized it could be more or less easily guested
  • and a random number between 0 and 9999, that could be rapidly enumerated (only 10000 possibilities).

A better random id should be generated, for example using a third-party library like
Data::Entropy, Crypt::Random, Math::Random::Secure, or Math::TrulyRandom. The size of the random part should be big enought to discard any enumeration possibility (128 bit of entropy for example). The size of the id it-self will be the same as it is hashed.

The problem with enumeration is that it could compromise the quality of data on hea: any person that can guest the library-id could delete and replace the values of a library. Please note, that it don't protect against new "bad" data.

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.