From 1995e6dda2e2055222ee17b26db7a942e46dc98c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Thu, 16 Nov 2023 12:43:59 +0100 Subject: [PATCH] Fix RS OAuth URL in Webfinger record --- app/controllers/webfinger_controller.rb | 2 +- spec/requests/webfinger_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/webfinger_controller.rb b/app/controllers/webfinger_controller.rb index fbc1bcb..be50ebd 100644 --- a/app/controllers/webfinger_controller.rb +++ b/app/controllers/webfinger_controller.rb @@ -37,7 +37,7 @@ class WebfingerController < ApplicationController end def remotestorage_link - auth_url = new_rs_oauth_url("#{@username}@#{Setting.primary_domain}") + auth_url = new_rs_oauth_url(@username) storage_url = "#{Setting.rs_storage_url}/#{@username}" { diff --git a/spec/requests/webfinger_spec.rb b/spec/requests/webfinger_spec.rb index 9d0ae57..1dcdfa3 100644 --- a/spec/requests/webfinger_spec.rb +++ b/spec/requests/webfinger_spec.rb @@ -18,7 +18,7 @@ RSpec.describe "WebFinger", type: :request do expect(rs_link["href"]).to eql("https://storage.kosmos.org/tony") oauth_url = rs_link["properties"]["http://tools.ietf.org/html/rfc6749#section-4.2"] - expect(oauth_url).to eql("http://www.example.com/rs/oauth/tony@kosmos.org") + expect(oauth_url).to eql("http://www.example.com/rs/oauth/tony") end end