Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stronger password hashes #46

Open
Lartza opened this issue Jan 2, 2015 · 4 comments
Open

Stronger password hashes #46

Lartza opened this issue Jan 2, 2015 · 4 comments

Comments

@Lartza
Copy link

Lartza commented Jan 2, 2015

When trying to find a way to add admins by letting them set their password I rummaged around the code and data a bit, and currently the admin passwords are non-salted SHA-1 hashes...

Maybe a more secure way should be implemented?

@Duckle29
Copy link

definetly need a more secure one. I'd recommend something like a salted sha512 or whirlpool. I might try and make a pull request.

@Duckle29
Copy link

At the current time, I'm not good enough with PHP to work that into mumpi, in a backwards or upgradeable fashion. Instead I'll leave a piece here:

function randString($strLen = 64, $seed = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()')
{
    $seed = str_split($seed); //Turn the seed into an array
    shuffle($seed); //shuffle it (probably redundant)
    foreach(array_rand($seed, $strLen) as $key) //return strlen ammount of random indexes in the array seed, and pass them as keys into the foreach.
    {
        $randString .= $seed[$key]; //append the random character to the string
    }
    return $randString;
}

That's the function I would use to generate a salt

@Kissaki
Copy link
Owner

Kissaki commented Feb 11, 2015

Yeah, I agree.
There is no reason not to use a more secure hashing algorithm.

@Kissaki
Copy link
Owner

Kissaki commented Jan 31, 2016

PR #59 implements a stronger PW mechanism with PHP 5.5s native methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants