Skip to content

fix(cookies): allow more characters in cookie names, as defined by more recent RFCs#490

Merged
TrueBrain merged 1 commit intomainfrom
fix-cookie-names
Jul 7, 2023
Merged

fix(cookies): allow more characters in cookie names, as defined by more recent RFCs#490
TrueBrain merged 1 commit intomainfrom
fix-cookie-names

Conversation

@TrueBrain
Copy link
Copy Markdown
Owner

Python's http.cookies library is very strict, and throws an exception when a cookie-name violates older RFC definitions of the name. This is reflected back as a 500. But the user has no indication that he was the cause of it.

More recent RFCs seem to allow for more characters, which is also reflected in the http.cookies library, but not used. So switch to that more relaxed definition of valid cookie name.

Still, illegal names should not return 500 in aiohttp, but that is a problem for another time.

…re recent RFCs

Python's http.cookies library is very strict, and throws an
exception when a cookie-name violates older RFC definitions of
the name. This is reflected back as a 500. But the user has no
indication that he was the cause of it.

More recent RFCs seem to allow for more characters, which is also
reflected in the http.cookies library, but not used. So switch to
that more relaxed definition of valid cookie name.

Still, illegal names should not return 500 in aiohttp, but that
is a problem for another time.
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 7, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (5943a8f) 83.68% compared to head (2feaceb) 83.69%.

❗ Current head 2feaceb differs from pull request most recent head d22003d. Consider uploading reports for the commit d22003d to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #490      +/-   ##
==========================================
+ Coverage   83.68%   83.69%   +0.01%     
==========================================
  Files          52       52              
  Lines        2770     2773       +3     
  Branches      430      430              
==========================================
+ Hits         2318     2321       +3     
  Misses        342      342              
  Partials      110      110              
Impacted Files Coverage Δ
truewiki/__main__.py 87.96% <100.00%> (+0.34%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@TrueBrain TrueBrain merged commit 5f8f8e5 into main Jul 7, 2023
@TrueBrain TrueBrain deleted the fix-cookie-names branch July 7, 2023 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant