-
Cookie parsing no longer removes a
.
Domain
prefix.Cookie::domain()
now removes a.
prefix before returning.As these changes are inverses, they are not likely observable. The change only affects manually set
domain
values via the.domain()
builder method, theset_domain()
setter method, or similar, which will now have a prefix of.
removed when returned byCookie::domain()
. This results in more consistent treatment ofDomain
values.
-
Added
Cookie::split_parse()
andCookie::split_parse_encoded()
methods.The methods split a
;
-joined cookie string and parse/decode the split values. They return a newly introduced iterator value of typeSplitCookies
over the parse results.
- Parsing fuzzers were introduced and run for 48 CPU hours without failure.
base64
was updated to0.21
.
base64
was updated to0.20
.
- The
,
,(
, and)
are percent-encoded/decoded when encoding is used. - The
aes-gcm
dependency was updated to 0.10.
- The MSRV is now
1.53
, up from1.41
in0.15
. time
has been updated to0.3
and is reexported from the crate root.
rust-crypto
dependencies were updated to their latest versions.
- A panic that could result from non-char boundary indexing was fixed.
- Stale doc references to version
0.14
were updated.
Cookie::force_remove()
takes&Cookie
instead ofCookie
.- Child jar methods split into immutable and mutable versions
(
Cookie::{private{_mut}, signed{_mut}}
). Cookie::encoded()
returns a newDisplay
struct.- Dates with year
<= 99
are handled like Chrome: range0..=68
maps to2000..=2068
,69..=99
to1969..=1999
. Cookie::{set_}expires()
operates on a newExpiration
enum.
- Added
Cookie::make_removal()
to manually create expired cookies. - Added
Cookie::stripped()
display variant to print only thename
andvalue
of a cookie. Key
implements a constant-timePartialEq
.- Added
Key::master()
to retrieve the full 512-bit master key. - Added
PrivateJar::decrypt()
to manually decrypt an encryptedCookie
. - Added
SignedJar::verify()
to manually verify a signedCookie
. Cookie::expires()
returns anOption<Expiration>
to allow distinguishing between unset andNone
expirations.- Added
Cookie::expires_datetime()
to retrieve the expiration as anOffsetDateTime
. - Added
Cookie::unset_expires()
to unset expirations.
- MSRV is 1.41.
rust-crypto
dependencies were updated to their latest versions.
- Documentation now builds on the stable channel.
rust-crypto
dependencies were updated to their latest versions.- Fixed 'interator' -> 'iterator' documentation typo.
- Updated
base64
dependency to 0.12. - Updated minimum
time
dependency to correct version: 0.2.11. - Added
readme
key toCargo.toml
, updatedlicense
field.
- The
Key::from_master()
method was deprecated in favor of the more aptly namedKey::derive_from()
. - The deprecated
CookieJar::clear()
method was removed.
- Added
Key::from()
to create aKey
structure from a full-length key. - Signed and private cookie jars can be individually enabled via the new
signed
andprivate
features, respectively. - Key derivation via key expansion can be individually enabled via the new
key-expansion
feature.
ring
is no longer a dependency:RustCrypto
-based cryptography is used in lieu ofring
. Prior to their inclusion here, thehmac
andhkdf
crates were audited.- Quotes, if present, are stripped from cookie values when parsing.
- The
time
dependency was unpinned from0.2.4
, allowing any0.2.x
version oftime
wherex >= 6
.
- The
time
dependency was pinned to0.2.4
due to upstream breaking changes in0.2.5
.
- Added the
CookieJar::reset_delta()
method, which reverts all delta changes to aCookieJar
.
time
was updated from 0.1 to 0.2.ring
was updated from 0.14 to 0.16.SameSite::None
now writesSameSite=None
to correspond with updatedSameSite
draft.SameSite
can be unset by passingNone
toCookie::set_same_site()
.CookieBuilder
gained a lifetime:CookieBuilder<'c>
.
- Added a CHANGELOG.
expires
,max_age
,path
, anddomain
can be unset by passingNone
to the respectiveCookie::set_{field}()
method.- The "Expires" field is limited to a date-time of Dec 31, 9999, 23:59:59.
- The
%
character is now properly encoded and decoded. - Constructor methods on
CookieBuilder
allow non-static lifetimes.