-
Notifications
You must be signed in to change notification settings - Fork 147
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
rfc6265bis - Cookie Parser - cookie-name includes too many characters now #2848
Comments
Do we know if the major browsers are interoperable here? |
My reading of the issues (#1074, #1119) was that the primary driver was to allow white space both around and in cookie names and values. The part of the proposal to allow white space in Some very basic testing indicates that the latest Chrome, Firefox and Safari all handle a cookie name of If we want to allow spaces in cookie values then we need to add If we want to allow spaces in cookie names then we can either add We also need to resolve the issue created by allowing Given the above and combined with my (narrow) experience with Tomcat that any change to the rules around cookies causes breakage for someone, my preferred way forward would be the minimal change that achieves support for
|
I am strongly against allowing spaces (%20) in cookie names since it will break cookie parsers all over (for example curl). Similar to my arguments around not accepting TABs (%09). See #2262 |
What about the switch to use |
I completely agree with this issue that at least the new treatment of |
FWIW, I just noticed that I approved that PR back then, and I shouldn't have. In my defense, I was focusing on a different part of the PR. That'll teach me to check more before approving. |
Not to mention that allowing Currently they have parts like ... http-extensions/draft-ietf-httpbis-rfc6265bis.md Lines 1331 to 1336 in d3f08e7
http-extensions/draft-ietf-httpbis-rfc6265bis.md Lines 1365 to 1370 in d3f08e7
http-extensions/draft-ietf-httpbis-rfc6265bis.md Lines 1952 to 1953 in d3f08e7
|
I think there are two issues here:
The consensus - at least in the comments here - for the first issue seems to be to revert to using There hasn't been much discussion about adding |
Allowing space (or TAB) in the value is a breaking change that most certainly will not be working in many existing cookie parsers. The curl cookie parser has been in use since October 1998, it still is, and it does not support spaces in either name nor value. Because cookies were always said not to have those. Correction: curl's parser does handle embedded spaces (not tabs) fine, and strips off leading and trailing ones. |
I suppose my argument is still: it is super fragile to change the set of accepted characters so it should be avoided in the name of compatibility with code that already shipped and will not update again in a long time. |
Closed by #2857 The original syntax change was indeed a mistake which has been reverted. |
The
cookie-name
changed from the definition of ...http-extensions/draft-ietf-httpbis-rfc6265bis.md
Line 470 in a214951
to
http-extensions/draft-ietf-httpbis-rfc6265bis.md
Line 567 in d3f08e7
As a result of commit 5469d51 from PR #1145
This changed the list of available characters on cookie-name in the following way.
!
"
#
$
%
&
'
(
)
*
+
,
-
.
/
0
1
2
3
4
5
6
7
8
9
:
;
<
=
>
?
@
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
[
]
^
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
{
|
}
~
It is particularly an issue with the x3D
=
character.But what about the rest of the changes?
Do we really want to allow cookies with names like
a(foo)=z
anda[{b|c}]=z
now?The text was updated successfully, but these errors were encountered: