Giter Club home page Giter Club logo

Comments (3)

onekopaka avatar onekopaka commented on May 26, 2024

generateSalt() is not used in password hashing, I believe the salt field is really a leftover from thinking about password hashing, and making sure to use salting. However bcrypt generates the salt itself.

generateSalt() is used for making the cookie for a session.

https://github.com/Eggbertx/gochan/blob/d4b7185ecd4adcd7e177c277ff4f1c7618e7e79f/src/manage.go#L476-L480

It may be the case that the salt field on staff table should be removed, since it's not used as far as I know.

from gochan.

Eggbertx avatar Eggbertx commented on May 26, 2024

Like @onekopaka said, the salt field is a carryover from Kusaba X's (less than great) design and has never actually been used, so I'm going to get rid of it. I'm also going to move config.RandomSeed to the DBPREFIXinfo SQL table and its value will be randomly generated when gochan is first run. If the DBPREFIXinfo table has a version row but no randomseed row, gochan will assume that something has gone catastrophically wrong, print a critical message, and exit, since this shouldn't be an issue under normal circumstances.

from gochan.

Eggbertx avatar Eggbertx commented on May 26, 2024

On second thought, I'm going to keep config.RandomSeed in the JSON file, but a random one will be generated on the first run if it's an empty string.

from gochan.

Related Issues (20)

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.