Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'set-cookie' — case-insensitive values #342

Closed
peace2000 opened this issue Jul 20, 2023 · 0 comments
Closed

Fix 'set-cookie' — case-insensitive values #342

peace2000 opened this issue Jul 20, 2023 · 0 comments

Comments

@peace2000
Copy link

peace2000 commented Jul 20, 2023

Gorhill made set-cookie scriptlet case-insensitive in uBO.

gorhill/uBlock@03d0d8d

Can this change be made into AG as well?

With this change, there would be no need to list every possible case variation in the scriptlet. This:

const allowedCookieValues = new Set([
        'true', 'True',
        'false', 'False',
        'yes', 'Yes',
        'y', 'Y',
        'no', 'No',
        'n', 'N',
        'ok', 'OK',
        'Accept', 'Reject',
        'allow', 'deny',

Could be:

const allowedCookieValues = new Set([
        'true',
        'false',
        'yes',
        'y',
        'no',
        'n',
        'ok',
        'accept', 'reject',
        'allow', 'deny',

And all these forms would be accepted:
true, True, TRUE, TrUe.

@adguard-bot adguard-bot changed the title Make set-cookie case-insensitive? Fix 'set-cookie' — case-insensitive values Jul 20, 2023
@adguard-bot adguard-bot assigned slavaleleka and unassigned maximtop Jul 20, 2023
adguard pushed a commit that referenced this issue Jul 20, 2023
Squashed commit of the following:

commit 5d42213
Author: David Tota <d.tota@adguard.com>
Date:   Thu Jul 20 18:31:57 2023 +0300

    Update description

commit e0abb4d
Author: David Tota <d.tota@adguard.com>
Date:   Thu Jul 20 18:31:51 2023 +0300

    Update description

commit f1695b7
Author: Adam Wróblewski <adam@adguard.com>
Date:   Thu Jul 20 17:20:23 2023 +0200

    Remove unnecessary examples from description

commit 9f1ed67
Author: David Tota <d.tota@adguard.com>
Date:   Thu Jul 20 18:11:46 2023 +0300

    Update changelog

commit 460e3d6
Author: Adam Wróblewski <adam@adguard.com>
Date:   Thu Jul 20 16:16:21 2023 +0200

    Fix 'set-cookie' — case-insensitive values
    Allow to use predefined values in any case variation in set-cookie scriptlet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants