Skip to content

spl_object_hash collisions #118

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

Closed
wvanderstel opened this issue Nov 20, 2018 · 2 comments
Closed

spl_object_hash collisions #118

wvanderstel opened this issue Nov 20, 2018 · 2 comments
Milestone

Comments

@wvanderstel
Copy link

wvanderstel commented Nov 20, 2018

Q A
Bug? yes
New Feature? no
Version 1.8.0 and higher

Behavior

The method "spl_object_hash" can issue the same hash for two different objects if one of the objects has been destroyed (i.e. garbage collector run).

This hash collision can cause a request to pass without actually adding the path.

See the notes for "spl_object_hash" in the PHP documentation: http://php.net/manual/en/function.spl-object-hash.php

Steps to Reproduce

Send multiple requests with the same HTTP client.

Possible Solutions

  1. Do not cache requests (as done in 1.70)
  2. Do not use 'spl_object_hash' for hashing objects
@dbu
Copy link
Contributor

dbu commented Nov 20, 2018

this is being discussed in #113 - glad if you can have a look at the discussion (not the current code change) and give your input

@Nyholm
Copy link
Member

Nyholm commented Jan 3, 2019

This will be fixed in 2.x

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

No branches or pull requests

3 participants