]> git.ipfire.org Git - thirdparty/curl.git/commit
digest: unquote realm and nonce before processing
authorEvgeny Grin <k2k@narod.ru>
Wed, 25 May 2022 07:20:18 +0000 (10:20 +0300)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 2 Jun 2022 06:18:34 +0000 (08:18 +0200)
commit3a6fe0c7671f8053f338fd9649a8f7f074b0e5cf
treef1d35b865b63ba8b7c1396653e43d60f2eba2389
parentf810047f9d7a983c4479ae07f79282b7c9b54ccb
digest: unquote realm and nonce before processing

RFC 7616 (and 2617) requires values to be "unquoted" before used for
digest calculations. The only place where unquoting can be done
correctly is header parsing function (realm="DOMAIN\\host" and
realm=DOMAN\\host are different realms).

This commit adds unquoting (de-escaping) of all values during header
parsing and quoting of the values during header forming. This approach
should be most straightforward and easy to read/maintain as all values
are processed in the same way as required by RFC.

Closes #8912
lib/vauth/digest.c
tests/data/test1095