mgomes / api_auth

HMAC authentication for Rails and HTTP Clients
MIT License
480 stars 147 forks source link

Fixed calculated_md5 as discussed in issue #46 #53

Closed karl-petter closed 9 years ago

karl-petter commented 9 years ago

Fixed calculated_md5 so it wont look for RAW_POST_DATA since that does not exist until raw_post is called. Instead just call raw_post since that will take care of returning correct value. And changed the test specs to use correct setup env for the requests.

kjg commented 9 years ago

Thanks for investigating this and making the Pull Request!

I'm a little nervous about this one because I'm wondering why there was ever a check there to begin with. All the tests pass now which is a great sign. I'm going to take a few minutes to test a few things manually just to do the due diligence and to ease my mind a bit. I'll get this taken care of as soon as possible though!

karl-petter commented 9 years ago

I understand your worry. I do not know the inner workings of ActionController and Rack well enough to fully understand but according to the research I made the way I implemented it shall work in all cases. But this was the first time I read the Rack code so might have missed things.

kjg commented 9 years ago

Released in v1.2.6. Thanks again!

karl-petter commented 9 years ago

Glad to help out!