From 3da1cc7d5e9df22d3445cdf07020b6c57d14fa5c Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Wed, 19 Sep 2018 23:47:31 +0900 Subject: Fix failed profile verification when rel attribute including values other than me (#8733) --- app/services/verify_link_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/services/verify_link_service.rb b/app/services/verify_link_service.rb index 9da7f93c3..846751cd5 100644 --- a/app/services/verify_link_service.rb +++ b/app/services/verify_link_service.rb @@ -27,6 +27,6 @@ class VerifyLinkService < BaseService def link_back_present? return false if @body.empty? - Nokogiri::HTML(@body).xpath('//a[@rel="me"]|//link[@rel="me"]').any? { |link| link['href'] == @link_back } + Nokogiri::HTML(@body).xpath('//a[contains(concat(" ", normalize-space(@rel), " "), " me ")]|//link[contains(concat(" ", normalize-space(@rel), " "), " me ")]').any? { |link| link['href'] == @link_back } end end -- cgit