Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>So I have a very similar issue, where I'm actually building a Rails-based openid <strong>provider</strong> but being consumed by another Rails app. I basically adapted the code from </p> <p>The whole URL was: </p> <pre><code>http://localhost:3000/openid?openid.assoc_handle=%7BHMAC-SHA1%7D%7B5193d33f%7D%7BdBrUwQ%3D%3D%7D&amp;openid.claimed_id=http%3A%2F%2Flocalhost%3A3000%2Fopenid%2Fwarren&amp;openid.identity=http%3A%2F%2Flocalhost%3A3000%2Fopenid%2Fwarren&amp;openid.mode=checkid_setup&amp;openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&amp;openid.ns.sreg=http%3A%2F%2Fopenid.net%2Fextensions%2Fsreg%2F1.1&amp;openid.realm=http%3A%2F%2Flocalhost&amp;openid.return_to=http%3A%2F%2Flocalhost%2Fsession%3F_method%3Dpost%26return_to%3D&amp;openid.sreg.required=nickname%2Cemail </code></pre> <p>I had a similar problem where the only parameters being reported were:</p> <pre><code>{"action"=&gt;"index", "controller"=&gt;"openid"} </code></pre> <p>So, suspecting that some parameter (maybe a period?) was causing it to hiccup, I went through and deleted them one by one until I found that deleting the following parameter enables the entire thing to go through correctly:</p> <pre><code>openid.mode=checkid_setup </code></pre> <p>That left all the remaining parameters correctly being parsed: </p> <pre><code>{"openid.assoc_handle"=&gt;"{HMAC-SHA1}{5193d33f}{dBrUwQ==}", "openid.claimed_id"=&gt;"http://localhost:3000/openid/warren", "openid.identity"=&gt;"http://localhost:3000/openid/warren", "openid.ns"=&gt;"http://specs.openid.net/auth/2.0", "openid.ns.sreg"=&gt;"http://openid.net/extensions/sreg/1.1", "openid.realm"=&gt;"http://localhost", "openid.return_to"=&gt;"http://localhost/session?_method=post&amp;return_to=", "openid.sreg.required"=&gt;"nickname,email", "action"=&gt;"index", "controller"=&gt;"openid"} </code></pre> <p>I'm now trying to find why openid.mode causes this issue. It fails even if I change it to openid.mode=5, so it's the key, not the value, causing the problem. </p> <p>Suspecting the ".mode" part of the string for the trouble (maybe ".mode" is a filetype or something being parsed by the routing?) I am looking towards this post on allowing periods, but it only applies to the <em>value</em>, not the key: <a href="https://stackoverflow.com/questions/7276125/rails-routing-and-params-with-a-in-them">rails routing and params with a &#39;.&#39; in them</a></p> <p>Will report back if I find more. </p> <p><strong>Update:</strong> I tried, in another Rails app, adding ?openid.mode=0 to the end of a URL -- ".mode" does not result in a parameter being read, but ".modes=" does and so does ".mod=". This confirms that ".mode" is causing a params parsing error.</p> <p><strong>Update 2:</strong> yikes... actually "?a.mode=0" does work. So far, only the complete string "openid.mode" does not work, and this is across various Rails apps. "?openid.mode" with nothing else results in: Parameters: {"openid.mode"=>nil}, but "?openid.mode=" with nothing after the "=" fails to pass any parameters besides action &amp; controller. Very odd.</p> <p><strong>Update 3:</strong> OK, figured it out, I believe -- the params were getting sanitized i.e. deleted by the rack-openid gem, in that gem's path: /lib/openid.rb:168, "sanitize_query_string". This seems to be incompatible with the example I was working with: <a href="https://github.com/openid/ruby-openid/tree/master/examples/rails_openid" rel="nofollow noreferrer">https://github.com/openid/ruby-openid/tree/master/examples/rails_openid</a>. Going to override that method.</p> <p><strong>Final update:</strong> I replaced this line:</p> <pre><code>oidreq = server.decode_request(params) </code></pre> <p>with this line, since we could no longer use the now-empty params hash:</p> <pre><code>oidreq = server.decode_request(Rack::Utils.parse_query(request.env['ORIGINAL_FULLPATH'])) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload