diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-04-27 17:06:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-27 17:06:47 +0200 |
commit | 2af4f3c4e22ab9a28a7fca49bee0ee2ed6256f27 (patch) | |
tree | 073f68695a0da1ee7dcf2f909a449b60286ad3f4 /spec/services/follow_remote_account_service_spec.rb | |
parent | b8e7eee8372f927a5a3b51e95db3707d34c4ac4b (diff) |
Improve shared status verification (#2525)
* Instead of parsing shared status contents verbatim, make roundtrip to purported original URL. Confirm that the "original" URL is from the same domain as the author it claims to be from. * Fix obvious typo, add comment * Use URI look-up first * Add test, update Goldfinger dependency to make less useless HTTP requests per Webfinger lookup
Diffstat (limited to 'spec/services/follow_remote_account_service_spec.rb')
-rw-r--r-- | spec/services/follow_remote_account_service_spec.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/services/follow_remote_account_service_spec.rb b/spec/services/follow_remote_account_service_spec.rb index a8d4a7c6b..66e9eb6c9 100644 --- a/spec/services/follow_remote_account_service_spec.rb +++ b/spec/services/follow_remote_account_service_spec.rb @@ -5,6 +5,7 @@ RSpec.describe FollowRemoteAccountService do before do stub_request(:get, "https://quitter.no/.well-known/host-meta").to_return(request_fixture('.host-meta.txt')) + stub_request(:get, "https://example.com/.well-known/webfinger?resource=acct:catsrgr8@example.com").to_return(status: 404) stub_request(:get, "https://example.com/.well-known/host-meta").to_return(status: 404) stub_request(:get, "https://quitter.no/.well-known/webfinger?resource=acct:gargron@quitter.no").to_return(request_fixture('webfinger.txt')) stub_request(:get, "https://quitter.no/.well-known/webfinger?resource=acct:catsrgr8@quitter.no").to_return(status: 404) |