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

Fixed security floor in hash_equals #84

Merged
merged 2 commits into from Jan 24, 2016
Merged

Fixed security floor in hash_equals #84

merged 2 commits into from Jan 24, 2016

Conversation

GrahamCampbell
Copy link
Contributor

Fixed security floor. Always better to rely on a third party secure implementation rather than maintaining a separate one that just recently was noticed to be broken.

@GrahamCampbell
Copy link
Contributor Author

I propose a new patch release is tagged asap after this PR.

@GrahamCampbell
Copy link
Contributor Author

I then propose we remove this extra public method we have here.

}

return $result === 0;
return hash_equals($known, $input);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think at this point we can even remove the timingSafeEquals method

@odino
Copy link
Contributor

odino commented Jan 24, 2016

this will also drop compatibility with 5.5 -- not that Im against it :)

let me know once its finalized and we can release a new major version

@GrahamCampbell
Copy link
Contributor Author

I think at this point we can even remove the timingSafeEquals method

Only if we do a minor version bump. I'd rather we patched this issue in a patch release, then removed the method.

@GrahamCampbell
Copy link
Contributor Author

let me know once its finalized and we can release a new major version

You mean minor?

@odino
Copy link
Contributor

odino commented Jan 24, 2016

I mean major, as hash_equals doesnt seem to be avilable pre-5.6? Or am I missing something?

@GrahamCampbell
Copy link
Contributor Author

I mean major, as hash_equals doesnt seem to be avilable pre-5.6? Or am I missing something?

We don't need to drop php 5.5 support. That dependency I added makes that function available on php 5.5.

@GrahamCampbell
Copy link
Contributor Author

I mean major, as hash_equals doesnt seem to be avilable pre-5.6? Or am I missing something?

If you're following semver, only minor releases are needed during 0.x to make BC breaking changes. I see no reason for you to need to bump from 0.6 to 1.0?

@GrahamCampbell
Copy link
Contributor Author

Oh, wait, I missread what version we were on, lol.

@odino
Copy link
Contributor

odino commented Jan 24, 2016

Oh, didnt realize you added the symfony polyfill -- will merge and tag!

odino added a commit that referenced this pull request Jan 24, 2016
Fixed security floor in hash_equals
@odino odino merged commit d234ab5 into namshi:master Jan 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants