Coder Social home page Coder Social logo

Password checking maybe broken about act HOT 7 CLOSED

waterkip avatar waterkip commented on July 20, 2024
Password checking maybe broken

from act.

Comments (7)

waterkip avatar waterkip commented on July 20, 2024 1

No, I'm working on this. I want to use Argon2 and use some OWASP recommendations to store passwords. I reverted the change earlier this week to use bcrypt again,

from act.

HaraldJoerg avatar HaraldJoerg commented on July 20, 2024

As far as I found in the records, the change from MD5 to BCRYPT was done in 2011 (853dfbe). The current handling of the salt in this branch is broken. Are you still working on this or should I put it on my todo list?

from act.

vanHoesel avatar vanHoesel commented on July 20, 2024

I think it would be great to just only have changes related to get an easy to install and runnable PSGI based version.

Any other improvements and and less important issues that are applicable for legacy and psgi would be needed to be postponed and kept in sync

from act.

HaraldJoerg avatar HaraldJoerg commented on July 20, 2024

Fixing this can be considered as part of the "easy to install and runnable PSGI based version". Right now there are two creepy (=undocumented, untested, and insecure) parameters which must be set in the global act.ini.

The algorithm doesn't bother me too much, in my opinion Bcrypt is good enough for the risk profile of a conference site. It's the salt handling which is broken. As an easy intermediate I'll create a fix which derives the salt from the login name. The change is easy, local and doesn't need an extra column in the users table for a secure random salt (with all the accompanying changes for DB init and migration).

Legacy, by the way, seems to use MD5 without a salt. So, no bonus for security, but also no penalty for bogus configuration values.

from act.

waterkip avatar waterkip commented on July 20, 2024

I think I fixed it, could you check @HaraldJoerg ?

I didn't use Argon2 yet, as the implementation cannot be used with a default Authen::Passphrase instance, so I stayed at bcrypt.

from act.

HaraldJoerg avatar HaraldJoerg commented on July 20, 2024

Looks good!

One remarks, though:

You are still referencing the bcrypt cost parameter:
cost => $Config->bcrypt_cost // 8,
This means that if you don't have it defined in your act.ini, then every request will throw out a warning - that's the way AppConfig and Act::Config work. I suggest to just drop that parameter and stick with a constant value of 8. I doubt that whoever runs an Act site will want to delve sufficiently deep into the crypto stuff that she can make an informed decision about value... and it's easy to mess up things if you change the value in a conference act.ini.

from act.

waterkip avatar waterkip commented on July 20, 2024

Cool! Fixed that.

I'm closing this one due to your "All OK" message :)

from act.

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.