Skip to content

Commit 59bf85f

Browse files
committed
AG-43972 support 'denied' by cookie scriptlets. #512
Squashed commit of the following: commit d8fce3c Merge: 115894c b9773c6 Author: slvvko <[email protected]> Date: Tue Nov 25 00:30:21 2025 -0500 fix changelog commit 115894c Author: slvvko <[email protected]> Date: Mon Nov 24 23:22:04 2025 -0500 update changelog commit 43c8013 Author: slvvko <[email protected]> Date: Mon Nov 24 23:20:55 2025 -0500 support denied by cookie scriptlets commit daa3a6c Author: slvvko <[email protected]> Date: Mon Nov 24 23:12:53 2025 -0500 add comment with issue link commit 8006d5a Author: slvvko <[email protected]> Date: Mon Nov 24 23:11:32 2025 -0500 determine string values more precisely for trusted-set-constant
1 parent b9773c6 commit 59bf85f

File tree

5 files changed

+9
-2
lines changed

5 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,17 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic
1212

1313
## Unreleased
1414

15+
### Added
16+
17+
- New value to `set-cookie` and `set-cookie-reload` scriptlets: `denied` [#512].
18+
1519
### Fixed
1620

1721
- Determination of string values more precisely
1822
for `trusted-set-constant` scriptlet [#499].
1923

2024
[#499]: https://github.com/AdguardTeam/Scriptlets/issues/499
25+
[#512]: https://github.com/AdguardTeam/Scriptlets/issues/512
2126

2227
## [v2.2.12] - 2025-11-12
2328

src/helpers/cookie-utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ export const getLimitedCookieValue = (value: string): string | number | null =>
119119
'allowed',
120120
'disallow',
121121
'deny',
122+
'denied',
122123
'enable',
123124
'enabled',
124125
'disable',

src/scriptlets/set-cookie-reload.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import {
3636
* - `accept`/ `accepted` / `notaccepted`
3737
* - `reject` / `rejected`
3838
* - `allow` / `allowed`
39-
* - `disallow` / `deny`
39+
* - `disallow` / `deny` / `denied`
4040
* - `enable` / `enabled`
4141
* - `disable` / `disabled`
4242
* - `necessary` / `required`

src/scriptlets/set-cookie.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import {
3838
* - `accept`/ `accepted` / `notaccepted`
3939
* - `reject` / `rejected`
4040
* - `allow` / `allowed`
41-
* - `disallow` / `deny`
41+
* - `disallow` / `deny` / `denied`
4242
* - `enable` / `enabled`
4343
* - `disable` / `disabled`
4444
* - `necessary` / `required`

tests/scriptlets/set-cookie.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const cookies = [
4747
['__test-cookie_allow', 'allow'],
4848
['__test-cookie_deny', 'deny'],
4949
['__test-cookie_dENy', 'dENy'],
50+
['__test-cookie_denied', 'denied'],
5051
['__test-cookie_0', '0'],
5152
['__test-cookie_1', '1'],
5253
['__test-cookie_on', 'on'],

0 commit comments

Comments
 (0)