Changeset 7115
- Timestamp:
- 06/25/07 16:29:26 (1 year ago)
- Files:
-
- plugins/open_id_authentication/CHANGELOG (modified) (1 diff)
- plugins/open_id_authentication/lib/open_id_authentication.rb (modified) (3 diffs)
- plugins/open_id_authentication/test/normalize_test.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/open_id_authentication/CHANGELOG
r6514 r7115 1 * Throw a InvalidOpenId exception instead of just a RuntimeError when the URL can't be normalized [DHH] 2 3 * Just use the path for the return URL, so extra query parameters don't interfere [DHH] 4 1 5 * Added a new default database-backed store after experiencing trouble with the filestore on NFS. The file store is still available as an option [DHH] 2 6 plugins/open_id_authentication/lib/open_id_authentication.rb
r6936 r7115 4 4 @@store = :db 5 5 mattr_accessor :store 6 7 class InvalidOpenId < StandardError 8 end 6 9 7 10 class Result … … 56 59 "http://" + url + "/" 57 60 else 58 raise "#{url} is not a correctly formatted OpenID address"61 raise InvalidOpenId.new("#{url} is not an OpenID URL") 59 62 end 60 63 end … … 131 134 open_id_response.redirect_url( 132 135 request.protocol + request.host_with_port + "/", 133 open_id_response.return_to("#{request. url}?open_id_complete=1")136 open_id_response.return_to("#{request.protocol + request.host_with_port + request.path}?open_id_complete=1") 134 137 ) 135 138 end plugins/open_id_authentication/test/normalize_test.rb
r6332 r7115 1 1 require 'test/unit' 2 require 'rubygems' 3 require 'active_support' 2 4 3 5 RAILS_ROOT = File.dirname(__FILE__) … … 20 22 end 21 23 end 24 25 def test_broken_open_id 26 assert_raises(InvalidOpenId) { normalize_url("=name") } 27 end 22 28 end