discourse/spec/lib/onebox
Natalie Tay 2d7e2b3810
FIX: Only block domains at the final destination (#15689) (#15783)
In an earlier PR, we decided that we only want to block a domain if 
the blocked domain in the SiteSetting is the final destination (/t/59305). That 
PR used `FinalDestination#get`. `resolve` however is used several places
 but blocks domains along the redirect chain when certain options are provided.

This commit changes the default options for `resolve` to not do that. Existing
users of `FinalDestination#resolve` are
- `Oneboxer#external_onebox`
- our onebox helper `fetch_html_doc`, which is used in amazon, standard embed 
and youtube
  - these folks already go through `Oneboxer#external_onebox` which already
  blocks correctly
2022-02-03 09:42:06 +08:00
..
engine FIX: Hide excerpt of binary files in GitHub onebox (#15639) 2022-01-19 14:45:36 +02:00
domain_checker_spec.rb FIX: Only block domains at the final destination (#15689) (#15783) 2022-02-03 09:42:06 +08:00
engine_spec.rb FIX: origins_to_regexes should always return an array (#15589) 2022-01-17 12:48:41 -05:00
helpers_spec.rb SECURITY: Onebox canonical links bypassing FinalDestination checks (#13605) 2021-07-01 20:09:29 +05:30
layout_spec.rb
matcher_spec.rb
oembed_spec.rb
open_graph_spec.rb
preview_spec.rb FEATURE: Onebox can match engines based on the content_type (#13876) 2021-07-30 13:36:30 -04:00
status_check_spec.rb