diff options
author | azul <azul@riseup.net> | 2017-11-08 02:53:50 -0800 |
---|---|---|
committer | azul <azul@riseup.net> | 2017-11-08 02:53:50 -0800 |
commit | a20a1c1671d3833c7f26b678f3e476b26126c8ca (patch) | |
tree | adbdb2d874a0bf45e40eff18e2135003a49aae02 | |
parent | f6189ee371ea55178eca4bfd865a508ac54af92d (diff) | |
parent | d12e6029889f7905c8b1586d93f653ed0978a88e (diff) |
Merge branch 'fix/webfinger-key' into 'master'
fix #8010 - publish public key in webfinger
Closes #8010
See merge request leap/webapp!52
-rw-r--r-- | app/views/webfinger/search.xml.erb | 2 | ||||
-rw-r--r-- | test/functional/webfinger_controller_test.rb | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/views/webfinger/search.xml.erb b/app/views/webfinger/search.xml.erb index 7328552..16ac137 100644 --- a/app/views/webfinger/search.xml.erb +++ b/app/views/webfinger/search.xml.erb @@ -2,6 +2,6 @@ <XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0"> <Subject><%= @presenter.subject %></Subject> <%- @presenter.links.each do |rel, link| %> - <Link rel=<%=rel%> type=<%=link[:type]%> href="<%= link[:key] %>"/> + <Link rel=<%=rel%> type=<%=link[:type]%> href="<%= link[:href] %>"/> <% end %> </XRD> diff --git a/test/functional/webfinger_controller_test.rb b/test/functional/webfinger_controller_test.rb index 6597b69..7e1c72a 100644 --- a/test/functional/webfinger_controller_test.rb +++ b/test/functional/webfinger_controller_test.rb @@ -15,11 +15,13 @@ class WebfingerControllerTest < ActionController::TestCase end test "get user webfinger xml" do - @user = stub_record :user, :public_key => 'my public key' + key = 'my public key' + @user = stub_record :user, :public_key => key User.stubs(:find_by_login).with(@user.login).returns(@user) get :search, :q => @user.email_address.to_s, :format => :xml assert_response :success assert_equal "application/xml", response.content_type + assert_includes response.body, Base64.encode64(key) end test "get user webfinger json" do |