Fix #5045: Exception on uploads when SauceNAO is the referrer URL.

Bug: We assumed the referer URL was from the same site as the target
URL. We tried to call methods on the referer only supported by the
target URL.

Fix: Ignore the referer URL when it's from a different site than the
target URL.
This commit is contained in:
evazion
2022-03-11 23:50:17 -06:00
parent 28971fe103
commit f2028c14fb
3 changed files with 28 additions and 12 deletions

View File

@@ -36,7 +36,6 @@ module Sources
end
def page_url
# XXX what if referer isn't from NicoSeiga?
parsed_referer&.page_url || parsed_url.page_url
end