detached f8e1820

fix: align cookie policy default with Epiphany ITP model

With ITP enabled, WebKit's ACCEPT_NO_THIRD_PARTY policy is silently
ignored. Switch the default to CookiePolicyAlways so ITP handles
third-party blocking, matching Epiphany's configuration.
commit
f8e18204d134fde4f57b1282f6b94fd06c0c6756
author
brice · · 2026-03-25 12:48 UTC
parent
b3d3030
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
4 files · +8 -8
M internal/infrastructure/config/defaults.go +1 -1
@@ -147,7 +147,7 @@ func DefaultConfig() *Config {
147147 Profile: ProfileDefault,
148148 PoolPrewarmCount: defaultWebViewPoolPrewarmCount,
149149 ZoomCacheSize: defaultZoomCacheSize,
150- CookiePolicy: CookiePolicyNoThirdParty,
150+ CookiePolicy: CookiePolicyAlways,
151151 WebKit: WebKitEngineConfig{
152152 ITPEnabled: true,
153153 SkiaCPUPaintingThreads: defaultSkiaCPUPaintingThreads,
@@ -147,7 +147,7 @@ func DefaultConfig() *Config {
147 Profile: ProfileDefault,147 Profile: ProfileDefault,
148 PoolPrewarmCount: defaultWebViewPoolPrewarmCount,148 PoolPrewarmCount: defaultWebViewPoolPrewarmCount,
149 ZoomCacheSize: defaultZoomCacheSize,149 ZoomCacheSize: defaultZoomCacheSize,
150- CookiePolicy: CookiePolicyNoThirdParty,150+ CookiePolicy: CookiePolicyAlways,
151 WebKit: WebKitEngineConfig{151 WebKit: WebKitEngineConfig{
152 ITPEnabled: true,152 ITPEnabled: true,
153 SkiaCPUPaintingThreads: defaultSkiaCPUPaintingThreads,153 SkiaCPUPaintingThreads: defaultSkiaCPUPaintingThreads,
M internal/infrastructure/config/defaults_test.go +1 -1
@@ -15,7 +15,7 @@ func TestDefaultConfig_CoreDefaults(t *testing.T) {
1515 // Engine defaults (replaces old Performance/Privacy sections)
1616 assert.Equal(t, "webkit", cfg.Engine.Type)
1717 assert.Equal(t, ProfileDefault, cfg.Engine.Profile)
18- assert.Equal(t, CookiePolicyNoThirdParty, cfg.Engine.CookiePolicy)
18+ assert.Equal(t, CookiePolicyAlways, cfg.Engine.CookiePolicy)
1919 assert.True(t, cfg.Engine.WebKit.ITPEnabled)
2020
2121 // Old sections (Rendering, Privacy, Performance, Runtime) have been removed from Config.
@@ -15,7 +15,7 @@ func TestDefaultConfig_CoreDefaults(t *testing.T) {
15 // Engine defaults (replaces old Performance/Privacy sections)15 // Engine defaults (replaces old Performance/Privacy sections)
16 assert.Equal(t, "webkit", cfg.Engine.Type)16 assert.Equal(t, "webkit", cfg.Engine.Type)
17 assert.Equal(t, ProfileDefault, cfg.Engine.Profile)17 assert.Equal(t, ProfileDefault, cfg.Engine.Profile)
18- assert.Equal(t, CookiePolicyNoThirdParty, cfg.Engine.CookiePolicy)18+ assert.Equal(t, CookiePolicyAlways, cfg.Engine.CookiePolicy)
19 assert.True(t, cfg.Engine.WebKit.ITPEnabled)19 assert.True(t, cfg.Engine.WebKit.ITPEnabled)
20 20
21 // Old sections (Rendering, Privacy, Performance, Runtime) have been removed from Config.21 // Old sections (Rendering, Privacy, Performance, Runtime) have been removed from Config.
M internal/infrastructure/config/loader.go +4 -4
@@ -226,14 +226,14 @@ func normalizeEngineConfig(config *Config) {
226226
227227 // Normalize cookie policy (engine)
228228 switch strings.ToLower(string(config.Engine.CookiePolicy)) {
229- case "", string(CookiePolicyNoThirdParty):
230- config.Engine.CookiePolicy = CookiePolicyNoThirdParty
231- case string(CookiePolicyAlways):
229+ case "", string(CookiePolicyAlways):
232230 config.Engine.CookiePolicy = CookiePolicyAlways
231+ case string(CookiePolicyNoThirdParty):
232+ config.Engine.CookiePolicy = CookiePolicyNoThirdParty
233233 case string(CookiePolicyNever):
234234 config.Engine.CookiePolicy = CookiePolicyNever
235235 default:
236- config.Engine.CookiePolicy = CookiePolicyNoThirdParty
236+ config.Engine.CookiePolicy = CookiePolicyAlways
237237 }
238238
239239 // Normalize performance profile (engine)
@@ -226,14 +226,14 @@ func normalizeEngineConfig(config *Config) {
226 226
227 // Normalize cookie policy (engine)227 // Normalize cookie policy (engine)
228 switch strings.ToLower(string(config.Engine.CookiePolicy)) {228 switch strings.ToLower(string(config.Engine.CookiePolicy)) {
229- case "", string(CookiePolicyNoThirdParty):229+ case "", string(CookiePolicyAlways):
230- config.Engine.CookiePolicy = CookiePolicyNoThirdParty
231- case string(CookiePolicyAlways):
232 config.Engine.CookiePolicy = CookiePolicyAlways230 config.Engine.CookiePolicy = CookiePolicyAlways
231+ case string(CookiePolicyNoThirdParty):
232+ config.Engine.CookiePolicy = CookiePolicyNoThirdParty
233 case string(CookiePolicyNever):233 case string(CookiePolicyNever):
234 config.Engine.CookiePolicy = CookiePolicyNever234 config.Engine.CookiePolicy = CookiePolicyNever
235 default:235 default:
236- config.Engine.CookiePolicy = CookiePolicyNoThirdParty236+ config.Engine.CookiePolicy = CookiePolicyAlways
237 }237 }
238 238
239 // Normalize performance profile (engine)239 // Normalize performance profile (engine)
M internal/infrastructure/config/loader_test.go +2 -2
@@ -14,7 +14,7 @@ func TestSetEngineDefaults(t *testing.T) {
1414 // Universal engine fields
1515 assert.Equal(t, "webkit", mgr.viper.GetString("engine.type"))
1616 assert.Equal(t, "default", mgr.viper.GetString("engine.profile"))
17- assert.Equal(t, "no_third_party", mgr.viper.GetString("engine.cookie_policy"))
17+ assert.Equal(t, "always", mgr.viper.GetString("engine.cookie_policy"))
1818 assert.Equal(t, 4, mgr.viper.GetInt("engine.pool_prewarm_count"))
1919 assert.Equal(t, 256, mgr.viper.GetInt("engine.zoom_cache_size"))
2020
@@ -37,5 +37,5 @@ func TestNormalizeConfig_EngineCookiePolicy(t *testing.T) {
3737
3838 normalizeConfig(cfg)
3939
40- assert.Equal(t, CookiePolicyNoThirdParty, cfg.Engine.CookiePolicy)
40+ assert.Equal(t, CookiePolicyAlways, cfg.Engine.CookiePolicy)
4141 }
@@ -14,7 +14,7 @@ func TestSetEngineDefaults(t *testing.T) {
14 // Universal engine fields14 // Universal engine fields
15 assert.Equal(t, "webkit", mgr.viper.GetString("engine.type"))15 assert.Equal(t, "webkit", mgr.viper.GetString("engine.type"))
16 assert.Equal(t, "default", mgr.viper.GetString("engine.profile"))16 assert.Equal(t, "default", mgr.viper.GetString("engine.profile"))
17- assert.Equal(t, "no_third_party", mgr.viper.GetString("engine.cookie_policy"))17+ assert.Equal(t, "always", mgr.viper.GetString("engine.cookie_policy"))
18 assert.Equal(t, 4, mgr.viper.GetInt("engine.pool_prewarm_count"))18 assert.Equal(t, 4, mgr.viper.GetInt("engine.pool_prewarm_count"))
19 assert.Equal(t, 256, mgr.viper.GetInt("engine.zoom_cache_size"))19 assert.Equal(t, 256, mgr.viper.GetInt("engine.zoom_cache_size"))
20 20
@@ -37,5 +37,5 @@ func TestNormalizeConfig_EngineCookiePolicy(t *testing.T) {
37 37
38 normalizeConfig(cfg)38 normalizeConfig(cfg)
39 39
40- assert.Equal(t, CookiePolicyNoThirdParty, cfg.Engine.CookiePolicy)40+ assert.Equal(t, CookiePolicyAlways, cfg.Engine.CookiePolicy)
41 }41 }

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close