https detection / url generation broken on heroku #287

Closed
pivotalcommon opened this Issue Dec 17, 2011 · 7 comments

Comments

Projects
None yet
4 participants

The problem I and other people trying to use openid via rack on heroku and a monkey-patch that solves it is detailed here:

http://mechanicalbee.com/2011/omniauth-openid-heroku-and-https.html

it would be great if it can be fixed, since we otherwise have to use a fairly extensive monkeypatch wich sucks.
If its not solveable maybe a config option that switches behavior could be possible...

(we are currently locked into rack 1.2.x, so a maintenance patch for this release would be great)

Owner

raggi commented Dec 17, 2011

This is a significant enough behavioral change that I don't feel comfortable back porting it to a year old point release. Why are you locked?

grosser commented Dec 18, 2011

We are on rails 3.0, and upgrading to 3.1 is not that simple :)
But if it works on 1.3 thats fine too, one more reason to upgrade rails ;)

grosser commented Jan 12, 2012

still an issue after updating to 1.3.6

grosser commented Jan 12, 2012

its no a "backport" issue <-> please remove the label

grosser commented Jan 13, 2012

sorry for the mixup, the problem is solved on 1.3.6 (we had another error in the same controller masking that the problem was resolved) -> you can close this as far as I am concerned

raggi closed this Jan 23, 2012

Am still getting this issue on 1.3.6. @grosser If you can recally can you elaborate more on how your controller was masking the issue?

Referring to the section "Using Logger To Get More Information" on http://www.arailsdemo.com/posts/18, helped me figure out the problem. It was because ruby-openid gem was doing the port validation on return from google auth which caused the error
return_to port does not match

[:scheme, :host, :port, :path].each do |meth|
  if msg_return_to.send(meth) != app_parsed.send(meth)
    raise ProtocolError, "return_to #{meth.to_s} does not match"
  end
end

I just monkey patched that piece to not check for port.

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