mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 12:13:37 +08:00
72f139191e
In some cases, between Discourse forums the hostname of a URL could match if they are hosting S3 files on the same bucket but the S3 bucket path might not. So e.g. https://testbucket.somesite.com/testpath/some/file/url.png vs https://testbucket.somesite.com/prodpath/some/file/url.png. So has_been_uploaded? was returning true for the second URL, even though it may have been uploaded on a different Discourse forum. This is a very rare case but must be accounted for, because this impacts UrlHelper.is_local which mistakenly thinks the file has already been downloaded and thus allows the URL to be cooked, where we want to return the full URL to be downloaded using PullHotlinkedImages. |
||
---|---|---|
.. | ||
distributed_cache_spec.rb | ||
jobs_spec.rb | ||
pausable_spec.rb | ||
post_spec.rb | ||
s3_store_spec.rb | ||
site_settings_spec.rb |