[Webkit-unassigned] [Bug 199367] [GTK][WPE] Explicitly blacklist problematic directories for sandbox

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 1 10:59:39 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=199367

--- Comment #8 from Michael Catanzaro <mcatanzaro at igalia.com> ---
Comment on attachment 373244
  --> https://bugs.webkit.org/attachment.cgi?id=373244
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=373244&action=review

Good catch Carlos!

> Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp:1199
> +    /* NOTE: Due to previous check there is always 1 leading `/` */

one

> Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp:1201
> +    return blacklistedPrefixes.find(splitPath.get()[1]) == WTF::notFound;

What happens if path is "/"? g_strsplit returns a strv with two empty strings and it doesn't crash? Seems unlikely?

> Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp:1225
> +    g_return_if_fail(pathIsNotBlacklisted(path));

This is OK, but g_critical() with an error message would be nicer.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190701/2a7d3681/attachment.html>


More information about the webkit-unassigned mailing list