Skip to content

Bump cryptography from 46.0.6 to 46.0.7 in /requirements in the pip group across 1 directory#12341

Open
dependabot[bot] wants to merge 1 commit intomasterfrom
dependabot/pip/requirements/pip-3344959f9f
Open

Bump cryptography from 46.0.6 to 46.0.7 in /requirements in the pip group across 1 directory#12341
dependabot[bot] wants to merge 1 commit intomasterfrom
dependabot/pip/requirements/pip-3344959f9f

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot bot commented on behalf of github Apr 8, 2026

Bumps the pip group with 1 update in the /requirements directory: cryptography.

Updates cryptography from 46.0.6 to 46.0.7

Changelog

Sourced from cryptography's changelog.

46.0.7 - 2026-04-07


* **SECURITY ISSUE**: Fixed an issue where non-contiguous buffers could be
  passed to APIs that accept Python buffers, which could lead to buffer
  overflow. **CVE-2026-39892**
* Updated Windows, macOS, and Linux wheels to be compiled with OpenSSL 3.5.6.

.. _v46-0-6:

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  • @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  • @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  • @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions
    You can disable automated security fix PRs for this repo from the Security Alerts page.

Bumps the pip group with 1 update in the /requirements directory: [cryptography](https://github.com/pyca/cryptography).


Updates `cryptography` from 46.0.6 to 46.0.7
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](pyca/cryptography@46.0.6...46.0.7)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-version: 46.0.7
  dependency-type: indirect
  dependency-group: pip
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Apr 8, 2026
@dependabot dependabot bot requested review from asvetlov and webknjaz as code owners April 8, 2026 21:34
@github-actions github-actions bot enabled auto-merge (squash) April 8, 2026 21:35
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 8, 2026

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
4408 3 4405 106
View the top 1 failed test(s) by shortest run time
tests.test_cookie_helpers::test_parse_set_cookie_headers_uses_unquote_with_octal[complex="\\042quoted\\042 text with \\012 newline"-complex-"quoted" text with \n newline-"\\042quoted\\042 text with \\012 newline"]
Stack Traces | 0.005s run time
header = 'complex="\\042quoted\\042 text with \\012 newline"'
expected_name = 'complex', expected_value = '"quoted" text with \n newline'
expected_coded = '"\\042quoted\\042 text with \\012 newline"'

    #x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[90m#x1B[39;49;00m
        (#x1B[33m"#x1B[39;49;00m#x1B[33mheader#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mexpected_name#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mexpected_value#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mexpected_coded#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
        [#x1B[90m#x1B[39;49;00m
            #x1B[90m# Test cookie values with octal escape sequences#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
            (#x1B[33mr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33mname=#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m012newline#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m012#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mname#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33m\n#x1B[39;49;00m#x1B[33mnewline#x1B[39;49;00m#x1B[33m\n#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33mr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m012newline#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m012#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
            (#x1B[90m#x1B[39;49;00m
                #x1B[33mr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33mtab=#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m011separated#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m011values#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mtab#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33m\t#x1B[39;49;00m#x1B[33mseparated#x1B[39;49;00m#x1B[33m\t#x1B[39;49;00m#x1B[33mvalues#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33mr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m011separated#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m011values#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            (#x1B[90m#x1B[39;49;00m
                #x1B[33mr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33mmixed=#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mhello#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m040world#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m041#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mmixed#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mhello world!#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33mr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mhello#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m040world#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m041#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            (#x1B[90m#x1B[39;49;00m
                #x1B[33mr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33mcomplex=#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m042quoted#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m042 text with #x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m012 newline#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mcomplex#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m'#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mquoted#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m text with #x1B[39;49;00m#x1B[33m\n#x1B[39;49;00m#x1B[33m newline#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33mr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m042quoted#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m042 text with #x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m012 newline#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
        ],#x1B[90m#x1B[39;49;00m
    )#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_parse_set_cookie_headers_uses_unquote_with_octal#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        header: #x1B[96mstr#x1B[39;49;00m, expected_name: #x1B[96mstr#x1B[39;49;00m, expected_value: #x1B[96mstr#x1B[39;49;00m, expected_coded: #x1B[96mstr#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""Test that parse_set_cookie_headers correctly unquotes values with octal sequences and preserves coded_value."""#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
>       result = parse_set_cookie_headers([header])#x1B[90m#x1B[39;49;00m
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m

expected_coded = '"\\042quoted\\042 text with \\012 newline"'
expected_name = 'complex'
expected_value = '"quoted" text with \n newline'
header     = 'complex="\\042quoted\\042 text with \\012 newline"'

#x1B[1m#x1B[31mtests/test_cookie_helpers.py#x1B[0m:1124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[31maiohttp/_cookie_helpers.py#x1B[0m:330: in parse_set_cookie_headers
    #x1B[0mcurrent_morsel.__setstate__(  #x1B[90m# type: ignore[attr-defined]#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        current_morsel = <Morsel: None=None>
        header     = 'complex="\\042quoted\\042 text with \\012 newline"'
        headers    = ['complex="\\042quoted\\042 text with \\012 newline"']
        i          = 47
        key        = 'complex'
        lower_key  = 'complex'
        match      = <re.Match object; span=(0, 47), match='complex="\\042quoted\\042 text with \\012 newline>
        morsel_seen = False
        n          = 47
        parsed_cookies = []
        value      = '"\\042quoted\\042 text with \\012 newline"'
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Morsel: None=None>
state = {'coded_value': '"\\042quoted\\042 text with \\012 newline"', 'key': 'complex', 'value': '"quoted" text with \n newline'}

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92m__setstate__#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m, state):#x1B[90m#x1B[39;49;00m
        key = state[#x1B[33m'#x1B[39;49;00m#x1B[33mkey#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
        value = state[#x1B[33m'#x1B[39;49;00m#x1B[33mvalue#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
        coded_value = state[#x1B[33m'#x1B[39;49;00m#x1B[33mcoded_value#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m _has_control_character(key, value, coded_value):#x1B[90m#x1B[39;49;00m
>           #x1B[94mraise#x1B[39;49;00m CookieError(#x1B[33m"#x1B[39;49;00m#x1B[33mControl characters are not allowed in cookies #x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
                              #x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mkey#x1B[33m!r}#x1B[39;49;00m#x1B[33m #x1B[39;49;00m#x1B[33m{#x1B[39;49;00mvalue#x1B[33m!r}#x1B[39;49;00m#x1B[33m #x1B[39;49;00m#x1B[33m{#x1B[39;49;00mcoded_value#x1B[33m!r}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE           http.cookies.CookieError: Control characters are not allowed in cookies 'complex' '"quoted" text with \n newline' '"\\042quoted\\042 text with \\012 newline"'#x1B[0m

coded_value = '"\\042quoted\\042 text with \\012 newline"'
key        = 'complex'
self       = <Morsel: None=None>
state      = {'coded_value': '"\\042quoted\\042 text with \\012 newline"', 'key': 'complex', 'value': '"quoted" text with \n newline'}
value      = '"quoted" text with \n newline'

#x1B[1m#x1B[.../hostedtoolcache/Python/3.14.4.../x64-freethreaded/lib/python3.14t/http/cookies.py#x1B[0m:379: CookieError
View the full list of 2 ❄️ flaky test(s)
tests.test_cookie_helpers::test_parse_set_cookie_headers_uses_unquote_with_octal[name="\\012newline\\012"-name-\nnewline\n-"\\012newline\\012"]

Flake rate in main: 9.09% (Passed 10 times, Failed 1 times)

Stack Traces | 0.006s run time
header = 'name="\\012newline\\012"', expected_name = 'name'
expected_value = '\nnewline\n', expected_coded = '"\\012newline\\012"'

    #x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[90m#x1B[39;49;00m
        (#x1B[33m"#x1B[39;49;00m#x1B[33mheader#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mexpected_name#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mexpected_value#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mexpected_coded#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
        [#x1B[90m#x1B[39;49;00m
            #x1B[90m# Test cookie values with octal escape sequences#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
            (#x1B[33mr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33mname=#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m012newline#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m012#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mname#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33m\n#x1B[39;49;00m#x1B[33mnewline#x1B[39;49;00m#x1B[33m\n#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33mr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m012newline#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m012#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
            (#x1B[90m#x1B[39;49;00m
                #x1B[33mr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33mtab=#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m011separated#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m011values#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mtab#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33m\t#x1B[39;49;00m#x1B[33mseparated#x1B[39;49;00m#x1B[33m\t#x1B[39;49;00m#x1B[33mvalues#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33mr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m011separated#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m011values#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            (#x1B[90m#x1B[39;49;00m
                #x1B[33mr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33mmixed=#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mhello#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m040world#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m041#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mmixed#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mhello world!#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33mr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mhello#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m040world#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m041#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            (#x1B[90m#x1B[39;49;00m
                #x1B[33mr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33mcomplex=#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m042quoted#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m042 text with #x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m012 newline#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mcomplex#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m'#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mquoted#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m text with #x1B[39;49;00m#x1B[33m\n#x1B[39;49;00m#x1B[33m newline#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33mr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m042quoted#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m042 text with #x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m012 newline#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
        ],#x1B[90m#x1B[39;49;00m
    )#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_parse_set_cookie_headers_uses_unquote_with_octal#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        header: #x1B[96mstr#x1B[39;49;00m, expected_name: #x1B[96mstr#x1B[39;49;00m, expected_value: #x1B[96mstr#x1B[39;49;00m, expected_coded: #x1B[96mstr#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""Test that parse_set_cookie_headers correctly unquotes values with octal sequences and preserves coded_value."""#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
>       result = parse_set_cookie_headers([header])#x1B[90m#x1B[39;49;00m
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m

expected_coded = '"\\012newline\\012"'
expected_name = 'name'
expected_value = '\nnewline\n'
header     = 'name="\\012newline\\012"'

#x1B[1m#x1B[31mtests/test_cookie_helpers.py#x1B[0m:1124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[31maiohttp/_cookie_helpers.py#x1B[0m:330: in parse_set_cookie_headers
    #x1B[0mcurrent_morsel.__setstate__(  #x1B[90m# type: ignore[attr-defined]#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        current_morsel = <Morsel: None=None>
        header     = 'name="\\012newline\\012"'
        headers    = ['name="\\012newline\\012"']
        i          = 22
        key        = 'name'
        lower_key  = 'name'
        match      = <re.Match object; span=(0, 22), match='name="\\012newline\\012"'>
        morsel_seen = False
        n          = 22
        parsed_cookies = []
        value      = '"\\012newline\\012"'
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Morsel: None=None>
state = {'coded_value': '"\\012newline\\012"', 'key': 'name', 'value': '\nnewline\n'}

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92m__setstate__#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m, state):#x1B[90m#x1B[39;49;00m
        key = state[#x1B[33m'#x1B[39;49;00m#x1B[33mkey#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
        value = state[#x1B[33m'#x1B[39;49;00m#x1B[33mvalue#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
        coded_value = state[#x1B[33m'#x1B[39;49;00m#x1B[33mcoded_value#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m _has_control_character(key, value, coded_value):#x1B[90m#x1B[39;49;00m
>           #x1B[94mraise#x1B[39;49;00m CookieError(#x1B[33m"#x1B[39;49;00m#x1B[33mControl characters are not allowed in cookies #x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
                              #x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mkey#x1B[33m!r}#x1B[39;49;00m#x1B[33m #x1B[39;49;00m#x1B[33m{#x1B[39;49;00mvalue#x1B[33m!r}#x1B[39;49;00m#x1B[33m #x1B[39;49;00m#x1B[33m{#x1B[39;49;00mcoded_value#x1B[33m!r}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE           http.cookies.CookieError: Control characters are not allowed in cookies 'name' '\nnewline\n' '"\\012newline\\012"'#x1B[0m

coded_value = '"\\012newline\\012"'
key        = 'name'
self       = <Morsel: None=None>
state      = {'coded_value': '"\\012newline\\012"', 'key': 'name', 'value': '\nnewline\n'}
value      = '\nnewline\n'

#x1B[1m#x1B[.../hostedtoolcache/Python/3.14.4.../x64-freethreaded/lib/python3.14t/http/cookies.py#x1B[0m:379: CookieError
tests.test_cookie_helpers::test_parse_set_cookie_headers_uses_unquote_with_octal[tab="\\011separated\\011values"-tab-\tseparated\tvalues-"\\011separated\\011values"]

Flake rate in main: 4.76% (Passed 20 times, Failed 1 times)

Stack Traces | 0.006s run time
header = 'tab="\\011separated\\011values"', expected_name = 'tab'
expected_value = '\tseparated\tvalues'
expected_coded = '"\\011separated\\011values"'

    #x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[90m#x1B[39;49;00m
        (#x1B[33m"#x1B[39;49;00m#x1B[33mheader#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mexpected_name#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mexpected_value#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mexpected_coded#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
        [#x1B[90m#x1B[39;49;00m
            #x1B[90m# Test cookie values with octal escape sequences#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
            (#x1B[33mr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33mname=#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m012newline#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m012#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mname#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33m\n#x1B[39;49;00m#x1B[33mnewline#x1B[39;49;00m#x1B[33m\n#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33mr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m012newline#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m012#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
            (#x1B[90m#x1B[39;49;00m
                #x1B[33mr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33mtab=#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m011separated#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m011values#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mtab#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33m\t#x1B[39;49;00m#x1B[33mseparated#x1B[39;49;00m#x1B[33m\t#x1B[39;49;00m#x1B[33mvalues#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33mr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m011separated#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m011values#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            (#x1B[90m#x1B[39;49;00m
                #x1B[33mr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33mmixed=#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mhello#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m040world#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m041#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mmixed#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mhello world!#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33mr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mhello#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m040world#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m041#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
            (#x1B[90m#x1B[39;49;00m
                #x1B[33mr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33mcomplex=#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m042quoted#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m042 text with #x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m012 newline#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mcomplex#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33m'#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mquoted#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m text with #x1B[39;49;00m#x1B[33m\n#x1B[39;49;00m#x1B[33m newline#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
                #x1B[33mr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m042quoted#x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m042 text with #x1B[39;49;00m#x1B[33m\#x1B[39;49;00m#x1B[33m012 newline#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ),#x1B[90m#x1B[39;49;00m
        ],#x1B[90m#x1B[39;49;00m
    )#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_parse_set_cookie_headers_uses_unquote_with_octal#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        header: #x1B[96mstr#x1B[39;49;00m, expected_name: #x1B[96mstr#x1B[39;49;00m, expected_value: #x1B[96mstr#x1B[39;49;00m, expected_coded: #x1B[96mstr#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""Test that parse_set_cookie_headers correctly unquotes values with octal sequences and preserves coded_value."""#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
>       result = parse_set_cookie_headers([header])#x1B[90m#x1B[39;49;00m
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m

expected_coded = '"\\011separated\\011values"'
expected_name = 'tab'
expected_value = '\tseparated\tvalues'
header     = 'tab="\\011separated\\011values"'

#x1B[1m#x1B[31mtests/test_cookie_helpers.py#x1B[0m:1124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[31maiohttp/_cookie_helpers.py#x1B[0m:330: in parse_set_cookie_headers
    #x1B[0mcurrent_morsel.__setstate__(  #x1B[90m# type: ignore[attr-defined]#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        current_morsel = <Morsel: None=None>
        header     = 'tab="\\011separated\\011values"'
        headers    = ['tab="\\011separated\\011values"']
        i          = 29
        key        = 'tab'
        lower_key  = 'tab'
        match      = <re.Match object; span=(0, 29), match='tab="\\011separated\\011values"'>
        morsel_seen = False
        n          = 29
        parsed_cookies = []
        value      = '"\\011separated\\011values"'
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Morsel: None=None>
state = {'coded_value': '"\\011separated\\011values"', 'key': 'tab', 'value': '\tseparated\tvalues'}

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92m__setstate__#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m, state):#x1B[90m#x1B[39;49;00m
        key = state[#x1B[33m'#x1B[39;49;00m#x1B[33mkey#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
        value = state[#x1B[33m'#x1B[39;49;00m#x1B[33mvalue#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
        coded_value = state[#x1B[33m'#x1B[39;49;00m#x1B[33mcoded_value#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m _has_control_character(key, value, coded_value):#x1B[90m#x1B[39;49;00m
>           #x1B[94mraise#x1B[39;49;00m CookieError(#x1B[33m"#x1B[39;49;00m#x1B[33mControl characters are not allowed in cookies #x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
                              #x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mkey#x1B[33m!r}#x1B[39;49;00m#x1B[33m #x1B[39;49;00m#x1B[33m{#x1B[39;49;00mvalue#x1B[33m!r}#x1B[39;49;00m#x1B[33m #x1B[39;49;00m#x1B[33m{#x1B[39;49;00mcoded_value#x1B[33m!r}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE           http.cookies.CookieError: Control characters are not allowed in cookies 'tab' '\tseparated\tvalues' '"\\011separated\\011values"'#x1B[0m

coded_value = '"\\011separated\\011values"'
key        = 'tab'
self       = <Morsel: None=None>
state      = {'coded_value': '"\\011separated\\011values"', 'key': 'tab', 'value': '\tseparated\tvalues'}
value      = '\tseparated\tvalues'

#x1B[1m#x1B[.../hostedtoolcache/Python/3.14.4.../x64-freethreaded/lib/python3.14t/http/cookies.py#x1B[0m:379: CookieError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants