webkit_web_context_set_sandbox_enabled() should not exist in the GTK 4 API. The sandbox should always be enabled, with no API function to disable it.
One more thing: we should crash if the application tries to allowlist / or /home or $HOME. We cannot prevent apps from allowlisting whatever they wish, but if they want to be stupid they should have to try somewhat harder than that.
Let's provide an environment variable as an out: disabling the sandbox is very useful for debugging purposes. But it should be much scarier than the current WEBKIT_FORCE_SANDBOX=0. I would name it WEBKIT_ALLOW_HACKING_ME=1 or something like that.
Pull request: https://github.com/WebKit/WebKit/pull/5944
Committed 259028@main (0f14b00d81e3): <https://commits.webkit.org/259028@main> Reviewed commits have been landed. Closing PR #5944 and removing active labels.