Ruby client for Yale's Central Authentication Service protocol -- an open source enterprise single sign on system for web applications.
332
stars
217
forks
source link
Unauthorized filter fails with format of class Mime:Type #41
Closed
hlascelles closed 12 years ago
Making a JSON request, the client filter attempts to handle an unauthorised user by returning a redirect for HTML, and an error code for JSON.
The key line is ~221 in filter.rb
In our setup (Rails 3.2), the format object is a mime type class, its to_s is 'json', but its to_sym is nil
Thus, all unauth'd JSON requests fail to get the correct code, and try to consume a login page (after following a 302).
This might well be a bug in a particular version of ActionPack, but defensively, this fixes it
Harry