mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +00:00
Browser+Ladybird+LibWeb: Prevent infinite growth of content filters
We never clear content filters on either end of the Browser-WebContent IPC connection. So when the filters change, we re-append all filters to the Vector holding them. This incidentally makes it impossible to remove a filter. Change both sides to clear their filter lists when receiving a new set of filters.
This commit is contained in:
parent
b0ffb15e13
commit
76ae60da15
5 changed files with 33 additions and 14 deletions
|
@ -636,8 +636,7 @@ Messages::WebContentServer::DumpLayoutTreeResponse ConnectionFromClient::dump_la
|
|||
|
||||
void ConnectionFromClient::set_content_filters(Vector<DeprecatedString> const& filters)
|
||||
{
|
||||
for (auto& filter : filters)
|
||||
Web::ContentFilter::the().add_pattern(filter);
|
||||
Web::ContentFilter::the().set_patterns(filters).release_value_but_fixme_should_propagate_errors();
|
||||
}
|
||||
|
||||
void ConnectionFromClient::set_autoplay_allowed_on_all_websites()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue