You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was investigating an issue I had on rstat.us in production: 500 Error when trying to add a remote user as an URI instead of something like [email protected]. I didn't know the ostatus protocol used identifiers that look like emails so I foolishly pasted an identi.ca URI. I've installed rstat.us on my machine and found an issue in ostatus, in lib/ostatus/feed.rb:54.
It's easy enough to reproduce by itself:
$ irb -r ./lib/ostatus
>> OStatus::Feed.from_url('http://example.com/uri')
NoMethodError: undefined method `new' for URI:Module
from /Users/user/code/ostatus/lib/ostatus/feed.rb:54:in `rescue in initialize'
from /Users/user/code/ostatus/lib/ostatus/feed.rb:54:in `initialize'
from /Users/user/code/ostatus/lib/ostatus/feed.rb:86:in `new'
from /Users/user/code/ostatus/lib/ostatus/feed.rb:86:in `from_url'
from (irb):1
from /Users/user/.rbenv/versions/1.9.3-p194/bin/irb:12:in `<main>'
URI is a module and doesn't have a constructor. This rescue is not covered by a unit test, removing it doesn't break any test. It's getting late here so I'm not going to be able to fix this tonight, just wanted to let you know about the issue. Thanks.
The text was updated successfully, but these errors were encountered:
@wilkie what should be the desired behaviour here? Should we simply reject, or attempt to discover the user's information somehow via part of webfinger? Happy to work on this given some direction.
What is the expected behavior for this? I am trying to fix this error hotsh/rstat.us#661 but it seems we to raise some sort of error given an invalid url here.
@chrismdp@Nakort tl;dr: It should discover the feed's atom url using the Link information, if possible.
The OStatus::Feed.from_url method expects the input to be a URI to an Atom stream... but I'd accept a fallback mechanism to check for a with a rel='alternate' and a type='application/atom+xml' in either the HTTP header or a link tag in the . The thing explodes because URI.new is the fallback, which is bizarre. I don't think I wrote that. :)
So, we need to add both the behavior to discover the feed into the OStatus gem, and a more appropriate fail condition, and write appropriate unit tests.
I was investigating an issue I had on rstat.us in production: 500 Error when trying to add a remote user as an URI instead of something like [email protected]. I didn't know the ostatus protocol used identifiers that look like emails so I foolishly pasted an identi.ca URI. I've installed rstat.us on my machine and found an issue in ostatus, in
lib/ostatus/feed.rb:54
.It's easy enough to reproduce by itself:
URI is a module and doesn't have a constructor. This rescue is not covered by a unit test, removing it doesn't break any test. It's getting late here so I'm not going to be able to fix this tonight, just wanted to let you know about the issue. Thanks.
The text was updated successfully, but these errors were encountered: