zendesk / samlr

Clean room implementation of SAML for Ruby
Apache License 2.0
30 stars 12 forks source link

Use UUID.random_create to generate UUID #31

Closed jhinklez closed 2 years ago

jhinklez commented 2 years ago

UUID.timestamp_create makes a call to ipconfig or ifconfig (depending on the OS architecture its running on) in order to retrieve the mac address which it then uses, in part, to generate a UUID. This creates a system-level dependency which may be undesired if running in a containerized environment where such binaries might not be available out of the box.

This PR removes that system-level dependency by using UUID.random_create instead; this method is used in numerous other places and maintains a high level of entropy.

Additionally, the exception thrown by the XSW attack was getting thrown before the assert_raises statement causing the test suite to fail so it was fixed as well.

nguyenmv2 commented 2 years ago

Looks like we don't even have CI enabled for this repo. I'll need to add that. Looks like this repo is not very well maintained.

nguyenmv2 commented 2 years ago

I just double checked on master - This test failure has been there for quite sometimes now and the approach you have make sense to me