commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
94d97e7b3db7e8ab18e68a5626947cb8b3156e10
Alex Touchet
2020-02-03T21:59:38
Update repository URL in 'Cargo.toml'.
diff --git a/Cargo.toml b/Cargo.toml index f8676b5..df7cb11 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>", "Sergio Benitez <sb@sergio.bz>"] version = "0.13.3" license = "MIT/Apache-2.0" -repository = "https://github.com/alexcrichton/cookie...
1
1
1
213aec555811f49b4a935856ebdc0f02149f2970
Paolo Barbolini
2020-02-03T18:59:38
Unpin 'time' version. Upstream has been fixed.
diff --git a/Cargo.toml b/Cargo.toml index dfe5459..57f85e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ secure = ["ring", "base64"] percent-encode = ["percent-encoding"] [dependencies] -time = { version = "=0.2.4", default-features = false, features = ["std"] } +time = { version = "0.2.6", default-fe...
1
1
1
53c19bf5c5ccef62c60db0b0d480c64fef55c6a1
Sergio Benitez
2020-01-28T08:52:09
Pin 'time' to 0.2.4 due to upstream breakage.
diff --git a/Cargo.toml b/Cargo.toml index fb260a0..c16a7de 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ secure = ["ring", "base64"] percent-encode = ["percent-encoding"] [dependencies] -time = { version = "0.2.4", default-features = false, features = ["std"] } +time = { version = "=0.2.4", default-fe...
1
1
1
f902f8005751d330337ed31a42cd169c193af328
Sergio Benitez
2020-01-24T04:11:32
Add 'CookieJar::reset_delta()' to reset delta ops.
diff --git a/src/jar.rs b/src/jar.rs index dae19d7..3a755af 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -232,6 +232,43 @@ impl CookieJar { } } + /// Removes all delta cookies, i.e. all cookies not added via + /// [`CookieJar::add_original()`], from this `CookieJar`. This undoes any + /// change...
1
37
0
d35d8e4355b47ce6fa5289ef9af052346e3efaef
Dirkjan Ochtman
2020-01-16T10:19:50
Be more compliant in the case of large max-ages. RFC 6265 section 5.2.2 does not state any upper or lower limit to the max-age attribute. If the value received looks like a valid negative or positive integer, follow the spec guidelines.
diff --git a/src/parse.rs b/src/parse.rs index d606fcd..886c7a6 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -1,5 +1,4 @@ use std::borrow::Cow; -use std::cmp; use std::error::Error; use std::str::Utf8Error; use std::fmt; @@ -163,21 +162,26 @@ fn parse_inner<'c>(s: &str, decode: bool) -> Result<Cookie<'c>, ParseE...
1
45
17
490e5324aae011a74e877107ce348f7a423392ec
Dirkjan Ochtman
2020-01-16T09:39:23
Upgrade time to 0.2.
diff --git a/Cargo.toml b/Cargo.toml index b984aa2..67ee188 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ secure = ["ring", "base64"] percent-encode = ["percent-encoding"] [dependencies] -time = "0.1" +time = { version = "0.2.4", default-features = false, features = ["std"] } percent-encoding = { vers...
5
49
39
50ef66357921673d8292aeecd344d2645ba65fe4
Sergio Benitez
2020-01-20T23:26:29
Parse 'SameSite=None' as 'SameSite::None'.
diff --git a/src/parse.rs b/src/parse.rs index 945c27b..f70ad8e 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -195,6 +195,8 @@ fn parse_inner<'c>(s: &str, decode: bool) -> Result<Cookie<'c>, ParseError> { cookie.same_site = Some(SameSite::Strict); } else if v.eq_ignore_ascii_case...
1
11
0
121d6887131e52b38cdf0b39a067c25651f89ed5
Erick Tryzelaar
2017-05-22T21:18:37
Limit "Expires" field to 9999 years.
diff --git a/src/lib.rs b/src/lib.rs index 83aa26b..7d8bc03 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -802,6 +802,12 @@ impl<'c> Cookie<'c> { /// ``` pub fn set_expires<T: Into<Option<Tm>>>(&mut self, time: T) { self.expires = time.into(); + + // RFC 6265 requires dates not to exceed 9999 ye...
1
13
1
ef7ae2714af3dd0871974ae1e6d4e976079038bd
Sergio Benitez
2020-01-17T20:11:14
Add methods to unset values, 'path', and 'domain'. Closes #91.
diff --git a/src/lib.rs b/src/lib.rs index cb5195e..83aa26b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -584,7 +584,8 @@ impl<'c> Cookie<'c> { self.value = CookieStr::Concrete(value.into()) } - /// Sets the value of `http_only` in `self` to `value`. + /// Sets the value of `http_only` in `self` to...
1
60
7
ae6d4230cac4d3230ae848c76de0862835ecaa8e
Sergio Benitez
2020-01-16T03:54:21
Update 'SameSite' for latest draft.
diff --git a/src/draft.rs b/src/draft.rs index ed7729d..1100fa3 100644 --- a/src/draft.rs +++ b/src/draft.rs @@ -10,18 +10,27 @@ use std::fmt; /// attribute is "Strict", then the cookie is never sent in cross-site requests. /// If the `SameSite` attribute is "Lax", the cookie is only sent in cross-site /// requests ...
2
60
18
4a7592c38d72036a0be24e68bdc55389cfbc0809
Sergio Benitez
2020-01-16T03:59:36
Add '%' to set of percent-encoded characters. Fixes #125.
diff --git a/src/lib.rs b/src/lib.rs index db593db..f4c6dbe 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -941,7 +941,8 @@ const USERINFO_ENCODE_SET: &AsciiSet = &PATH_ENCODE_SET .add(b'\\') .add(b']') .add(b'^') - .add(b'|'); + .add(b'|') + .add(b'%'); /// Wrapper around `Cookie` whose `Displa...
1
4
3
370a3bb0d6415e85fef61759f26b7cc541ad5de4
koushiro
2019-10-30T07:23:18
Update 'base64' to 0.11.
diff --git a/Cargo.toml b/Cargo.toml index 25f3f10..b984aa2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ percent-encode = ["percent-encoding"] time = "0.1" percent-encoding = { version = "2.0", optional = true } ring = { version = "0.16.0", optional = true } -base64 = { version = "0.10.0", optional = t...
1
1
1
e0f3e6c4daea108d55838c56da777b36898bd223
Sergio Benitez
2019-09-10T23:54:20
Allow unsetting 'expires' and 'max_age' with 'None'.
diff --git a/src/lib.rs b/src/lib.rs index fe5d802..db593db 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -639,7 +639,8 @@ impl<'c> Cookie<'c> { self.same_site = Some(value); } - /// Sets the value of `max_age` in `self` to `value`. + /// Sets the value of `max_age` in `self` to `value`. If `value` ...
1
15
7
4f98ceb499b3557d59400c358eb315e2c7672aa6
Sergio Benitez
2019-09-10T23:15:31
Lift static lifetime restrictions on constructors.
diff --git a/src/builder.rs b/src/builder.rs index 7145be5..99d96da 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -32,12 +32,12 @@ use ::{Cookie, SameSite}; /// # } /// ``` #[derive(Debug, Clone)] -pub struct CookieBuilder { +pub struct CookieBuilder<'c> { /// The cookie being built. - cookie: Cookie<'...
3
85
63
673caae95bc95df4c4106846d8a93990732d6150
Sergio Benitez
2019-09-10T20:21:12
Decrease allocations in secure functions.
diff --git a/src/secure/key.rs b/src/secure/key.rs index a313e47..bf053e0 100644 --- a/src/secure/key.rs +++ b/src/secure/key.rs @@ -23,6 +23,13 @@ pub struct Key { encryption_key: [u8; PRIVATE_KEY_LEN] } +impl KeyType for &Key { + #[inline(always)] + fn len(&self) -> usize { + SIGNED_KEY_LEN + PRI...
3
70
70
1c3bc2a84347e48cecc991e928b6a20ef7e416d1
Jeb Rosen
2019-09-10T15:07:29
Update 'ring' to 0.16.
diff --git a/Cargo.toml b/Cargo.toml index 8a4be92..25f3f10 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ percent-encode = ["percent-encoding"] [dependencies] time = "0.1" percent-encoding = { version = "2.0", optional = true } -ring = { version = "0.14.0", optional = true } +ring = { version = "0.16.0"...
5
75
44
4519b1106f0fbf6cbc966d83a9d6b018884c5666
Nikhil Benesch
2019-07-30T15:16:41
Upgrade to url 2.0 ecosystem The url crate recently released a backwards-incompatible update, v2.0. As part of this upgrade, the percent-encoding code has been moved into its own crate, titled percent-encoding, and no longer ships standard percent encoding sets.
diff --git a/Cargo.toml b/Cargo.toml index 61f0ada..8a4be92 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,11 +12,11 @@ and private (encrypted + signed) jars. [features] secure = ["ring", "base64"] -percent-encode = ["url"] +percent-encode = ["percent-encoding"] [dependencies] time = "0.1" -url = { version = "...
3
27
5
c59d94e1492f2aa8ce0949335d494322ca25366e
Mateusz Mikuła
2019-01-18T17:26:02
Bump 'base64' to 0.10.
diff --git a/Cargo.toml b/Cargo.toml index 49a4cfe..5c8d571 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ percent-encode = ["url"] time = "0.1" url = { version = "1.0", optional = true } ring = { version = "0.14.0", optional = true } -base64 = { version = "0.9.0", optional = true } +base64 = { version =...
1
1
1
c41fe46cbfc4848b62282da8a70ed05b3ffa2bcb
Yusuke Sasaki
2019-01-10T09:17:56
bump ring to 0.14.0
diff --git a/Cargo.toml b/Cargo.toml index 5a1fca5..49a4cfe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ percent-encode = ["url"] [dependencies] time = "0.1" url = { version = "1.0", optional = true } -ring = { version = "0.13.0", optional = true } +ring = { version = "0.14.0", optional = true } base6...
2
8
4
c253a23703907302306a7f72fabdf0bd7aec95b0
Yusuke Sasaki
2019-01-16T07:44:03
force the order of the internal iterators in Iter
diff --git a/src/jar.rs b/src/jar.rs index b6231fd..0f1c6dd 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -344,7 +344,10 @@ impl CookieJar { /// } /// ``` pub fn iter(&self) -> Iter { - Iter { delta_cookies: self.delta_cookies.union(&self.original_cookies) } + Iter { + delta_cookie...
1
7
3
5652928dbd21afd79b2077c3bc43923121229d27
Sergio Benitez
2018-07-25T05:34:40
Bump to 0.11.
diff --git a/Cargo.toml b/Cargo.toml index ce1bd61..5a1fca5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>", "Sergio Benitez <sb@sergio.bz>"] -version = "0.11.0-dev" +version = "0.11.0" license = "MIT/Apache-2.0" repository = "ht...
2
3
3
f191ca50cc91a4bf268b7eb254ebc78b73a94ffc
Sergio Benitez
2018-07-21T23:32:50
Bump 'ring' to 0.13.
diff --git a/Cargo.toml b/Cargo.toml index 5cc6022..ce1bd61 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ percent-encode = ["url"] [dependencies] time = "0.1" url = { version = "1.0", optional = true } -ring = { version = "0.13.0-alpha", optional = true } +ring = { version = "0.13.0", optional = true } ...
1
1
1
7f8748b00c27daaf9b43e4eafec8be28d6bbd700
Sergio Benitez
2018-04-15T00:46:29
Clarify cookie replacement behavior.
diff --git a/src/jar.rs b/src/jar.rs index 695a005..b6231fd 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -121,10 +121,13 @@ impl CookieJar { .and_then(|c| if !c.removed { Some(&c.cookie) } else { None }) } - /// Adds an "original" `cookie` to this jar. Adding an original cookie does - /// not a...
1
9
5
0365a18e4518e498ac6a508dab6b006add7f162e
Sergio Benitez
2018-04-15T00:42:49
Allow any lifetime for cookies passed to 'force_remove'.
diff --git a/src/jar.rs b/src/jar.rs index f98b84a..695a005 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -264,7 +264,7 @@ impl CookieJar { /// assert_eq!(jar.iter().count(), 0); /// # } /// ``` - pub fn force_remove(&mut self, cookie: Cookie<'static>) { + pub fn force_remove<'a>(&mut self, cookie: C...
1
1
1
9edf0ee7037440bf8244722c50804a278524811c
Sergio Benitez
2018-04-15T00:38:59
Add 'CookieJar::force_remove()' method.
diff --git a/src/jar.rs b/src/jar.rs index c2fed80..f98b84a 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -228,6 +228,47 @@ impl CookieJar { } } + /// Removes `cookie` from this jar completely. This method differs from + /// `remove` in that no delta cookie is created under any condition. Neither + ...
3
43
2
8579b4b7ca0fb4d698e0f4452d3fb55e9e72c50d
Sergio Benitez
2018-01-05T07:30:11
Bump 'ring' to 0.13.0-alpha.
diff --git a/Cargo.toml b/Cargo.toml index f7fd43e..5cc6022 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ percent-encode = ["url"] [dependencies] time = "0.1" url = { version = "1.0", optional = true } -ring = { version = "0.12.0", optional = true } +ring = { version = "0.13.0-alpha", optional = true } ...
1
1
1
a15b37af20c214815006019b67d321662871a290
Sergio Benitez
2018-01-05T07:39:48
Add 'SameSite::None' to explicitly reject the 'SameSite' attribute.
diff --git a/src/draft.rs b/src/draft.rs index bf504cf..ed7729d 100644 --- a/src/draft.rs +++ b/src/draft.rs @@ -10,6 +10,8 @@ use std::fmt; /// attribute is "Strict", then the cookie is never sent in cross-site requests. /// If the `SameSite` attribute is "Lax", the cookie is only sent in cross-site /// requests wi...
2
39
6
0cb8a057e9efda98529293ab41e4852f27e0d71e
Bastien Orivel
2017-12-28T11:30:20
Bump base64 to 0.9
diff --git a/Cargo.toml b/Cargo.toml index 40e5c34..f7fd43e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ percent-encode = ["url"] time = "0.1" url = { version = "1.0", optional = true } ring = { version = "0.12.0", optional = true } -base64 = { version = "0.7.0", optional = true } +base64 = { version =...
1
1
1
f4e6930a32752bfcad544d2a5163c9ddd032936d
Sergio Benitez
2017-11-28T23:51:51
Allow unused 'std::ascii::AsciiExt' for backwards compat.
diff --git a/src/lib.rs b/src/lib.rs index cc3244e..3350c2a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -74,10 +74,12 @@ mod draft; #[cfg(feature = "secure")] pub use secure::*; use std::borrow::Cow; -use std::ascii::AsciiExt; use std::fmt; use std::str::FromStr; +#[allow(unused_imports)] +use std::ascii::Ascii...
2
6
2
a53d0069d43dffbd4862d885270a554702b676ae
Stanislav Ivanov
2017-11-25T15:53:35
Add 'add_original' method to private/signed jars.
diff --git a/src/secure/private.rs b/src/secure/private.rs index bad4820..56dcdbc 100644 --- a/src/secure/private.rs +++ b/src/secure/private.rs @@ -104,6 +104,44 @@ impl<'a> PrivateJar<'a> { /// assert_eq!(jar.private(&key).get("name").unwrap().value(), "value"); /// ``` pub fn add(&mut self, mut cookie...
2
70
5
b8298e263b29cfb3a0f63f68b51bc5f026e81b81
Sergio Benitez
2017-10-10T02:37:32
Update to base64 0.7.0.
diff --git a/Cargo.toml b/Cargo.toml index 7763a33..40e5c34 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ percent-encode = ["url"] time = "0.1" url = { version = "1.0", optional = true } ring = { version = "0.12.0", optional = true } -base64 = { version = "0.6.0", optional = true } +base64 = { version =...
1
1
1
f3dda4c3c0181d4aab20c086c70d0cea2556386e
Sergio Benitez
2017-10-10T02:32:23
Use a -dev version on master.
diff --git a/Cargo.toml b/Cargo.toml index 8c4471d..7763a33 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>", "Sergio Benitez <sb@sergio.bz>"] -version = "0.10.0" +version = "0.11.0-dev" license = "MIT/Apache-2.0" repository = "ht...
1
1
1
d374eaa5c8198da788c44b35551adf3dbdba0228
Sergio Benitez
2017-10-10T02:20:06
Use cookie's name as AEAD AD to prevent value swaps.
diff --git a/src/secure/private.rs b/src/secure/private.rs index bbb2df5..bad4820 100644 --- a/src/secure/private.rs +++ b/src/secure/private.rs @@ -36,19 +36,20 @@ impl<'a> PrivateJar<'a> { PrivateJar { parent: parent, key: key_array } } - /// Given a sealed value `str` where the nonce is prepended ...
1
12
8
9706ac9182745a75c9fdc40c6af48b4b254b615e
Sergio Benitez
2017-10-06T04:50:13
Make 'secure' and 'http_only' optional.
diff --git a/src/builder.rs b/src/builder.rs index 9d0cbc7..7145be5 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -154,7 +154,7 @@ impl CookieBuilder { /// .secure(true) /// .finish(); /// - /// assert_eq!(c.secure(), true); + /// assert_eq!(c.secure(), Some(true)); /// ``` ...
3
63
29
6447af91a3f2f5f7f07d1e9ea804158dd6a61345
Sergio Benitez
2017-08-31T23:29:11
Update 'ring' to 0.12.
diff --git a/Cargo.toml b/Cargo.toml index 57786ff..b138adc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ percent-encode = ["url"] [dependencies] time = "0.1" url = { version = "1.0", optional = true } -ring = { version = "0.11.0", optional = true } +ring = { version = "0.12.0", optional = true } base6...
1
1
1
c318b87f43f3ada741ba08093cd351bc3ae97d25
Sergio Benitez
2017-06-17T20:28:08
Bump to 0.9.1.
diff --git a/Cargo.toml b/Cargo.toml index 24350ef..57786ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>", "Sergio Benitez <sb@sergio.bz>"] -version = "0.9.0" +version = "0.9.1" license = "MIT/Apache-2.0" repository = "https://...
1
1
1
ed21ab2ef60730a1ec17f80448630288a7e145e4
Sergio Benitez
2017-06-17T20:27:35
Ensure persistence of deletion cookie path.
diff --git a/src/jar.rs b/src/jar.rs index a678916..c2fed80 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -217,18 +217,12 @@ impl CookieJar { /// jar.remove(Cookie::named("name")); /// assert_eq!(jar.delta().count(), 0); /// ``` - pub fn remove(&mut self, cookie: Cookie<'static>) { - fn make_remo...
1
18
9
8783219c50c5f2f995f9f6196c6ffa71229ec6f7
Lance Carlson
2017-06-13T20:52:18
upgrade ring to 0.11.0
diff --git a/Cargo.toml b/Cargo.toml index 8862ea6..b909020 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,5 +18,5 @@ percent-encode = ["url"] [dependencies] time = "0.1" url = { version = "1.0", optional = true } -ring = { version = "0.9.4", optional = true } +ring = { version = "0.11.0", optional = true } base64...
1
1
1
b51f10dd533e600759a8bb574623eee7c687cf48
Sergio Benitez
2017-05-09T19:34:52
Bump version to get updated docs.
diff --git a/Cargo.toml b/Cargo.toml index fd4d55c..8862ea6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>", "Sergio Benitez <sb@sergio.bz>"] -version = "0.8.0" +version = "0.8.1" license = "MIT/Apache-2.0" repository = "https://github.co...
1
1
1
6d9379847d7e84910b3e5803f2ebcace93a9860f
Sergio Benitez
2017-05-09T19:34:32
Update more version numbers.
diff --git a/src/lib.rs b/src/lib.rs index 68f6cbd..b0e5b8f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,7 +10,7 @@ //! Add the following to the `[dependencies]` section of your `Cargo.toml`: //! //! ```ignore -//! cookie = "0.7" +//! cookie = "0.8" //! ``` //! //! Then add the following line to your crate roo...
1
2
2
387389ca5bc3dc83ac68c24bed2ae87bcb4e9798
Brian Smith
2017-05-09T03:00:07
Update to *ring* 0.9.4.
diff --git a/Cargo.toml b/Cargo.toml index 5748952..fd4d55c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,5 +18,5 @@ percent-encode = ["url"] [dependencies] time = "0.1" url = { version = "1.0", optional = true } -ring = { version = "0.9.1", optional = true } +ring = { version = "0.9.4", optional = true } base64 ...
1
1
1
3ebcdab6e91c4663968179e4eca2e2760e83bbcc
Brian Smith
2017-05-08T21:26:08
0.8.0: Update to base64 0.5.2 and *ring* 0.9.1. base64 0.5.2 fixes a security vulnerability. *ring* 0.9 is used by the latest version of Rustls and some other crates.
diff --git a/Cargo.toml b/Cargo.toml index 8a9f1c3..5748952 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>", "Sergio Benitez <sb@sergio.bz>"] -version = "0.7.6" +version = "0.8.0" license = "MIT/Apache-2.0" repository = "https://github.co...
3
5
5
6ae84f292c2237682f55d43903af2801c90dba65
Sergio Benitez
2017-05-07T19:28:54
Bump to 0.7.6.
diff --git a/Cargo.toml b/Cargo.toml index fbccf04..8a9f1c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>", "Sergio Benitez <sb@sergio.bz>"] -version = "0.7.5" +version = "0.7.6" license = "MIT/Apache-2.0" repository = "https://github.co...
1
1
1
ee18b79fbf0903b73da525d302b09448009e0050
Erick Tryzelaar
2017-05-07T05:21:17
Don't panic if passed in a large max age. Duration will panic if the number of seconds is greater than 2^63/1000. This just caps the Max-Age to the highest value we can parse.
diff --git a/src/parse.rs b/src/parse.rs index 3bcac97..2caf86d 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -1,4 +1,5 @@ use std::borrow::Cow; +use std::cmp; use std::error::Error; use std::ascii::AsciiExt; use std::str::Utf8Error; @@ -152,7 +153,12 @@ fn parse_inner<'c>(s: &str, decode: bool) -> Result<Cookie<...
1
16
1
32d74f88c450f5625a2047c4f9a50d6a890324f2
Sergio Benitez
2017-04-19T10:40:24
Bump to 0.7.5.
diff --git a/Cargo.toml b/Cargo.toml index 6e8dda6..fbccf04 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>", "Sergio Benitez <sb@sergio.bz>"] -version = "0.7.4" +version = "0.7.5" license = "MIT/Apache-2.0" repository = "https://github.co...
1
1
1
6165ca2ad681409e95a64f5fc8b33d3edeb53bfb
Sergio Benitez
2017-04-19T10:39:59
Implement Clone for Key.
diff --git a/src/secure/key.rs b/src/secure/key.rs index f215da7..5d7303c 100644 --- a/src/secure/key.rs +++ b/src/secure/key.rs @@ -19,6 +19,7 @@ const KEYS_INFO: &'static str = "COOKIE;SIGNED:HMAC-SHA256;PRIVATE:AEAD-AES-256- /// both a `PrivateJar` and a `SignedJar`. /// /// This type is only available when the `...
1
1
0
cc071a0682316d058c0b277ba68fe8539c63e717
Sergio Benitez
2017-04-11T23:47:04
Depend on ring >= 0.7.4 for bugfix. Bump cookie to 0.7.4.
diff --git a/Cargo.toml b/Cargo.toml index 2c5e8fa..6e8dda6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>", "Sergio Benitez <sb@sergio.bz>"] -version = "0.7.3" +version = "0.7.4" license = "MIT/Apache-2.0" repository = "https://github.co...
2
2
3
c545036635507a4a5db1d8b1d4303dc332b63544
Sergio Benitez
2017-03-21T05:05:03
Name the Lax variable 'lax'.
diff --git a/src/draft.rs b/src/draft.rs index 0e094d9..bf504cf 100644 --- a/src/draft.rs +++ b/src/draft.rs @@ -48,9 +48,9 @@ impl SameSite { /// ```rust /// use cookie::SameSite; /// - /// let strict = SameSite::Lax; - /// assert!(strict.is_lax()); - /// assert!(!strict.is_strict()); + /// ...
1
3
3
3ef666c186d8503294fd2463592c0590911398ed
Sergio Benitez
2017-03-20T22:59:55
Bump to 0.7.3.
diff --git a/Cargo.toml b/Cargo.toml index 1bedd47..2c5e8fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>", "Sergio Benitez <sb@sergio.bz>"] -version = "0.7.2" +version = "0.7.3" license = "MIT/Apache-2.0" repository = "https://github.co...
1
1
1
cecb778d7bdd3fa85119a638ccced414f72d61af
Sergio Benitez
2017-03-20T22:56:20
Use for instead of while. Don't match on bool.
diff --git a/src/jar.rs b/src/jar.rs index 5db52dd..c4ffa42 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -412,7 +412,7 @@ impl<'a> Iterator for Iter<'a> { type Item = &'a Cookie<'static>; fn next(&mut self) -> Option<&'a Cookie<'static>> { - while let Some(cookie) = self.delta_cookies.next() { + ...
2
5
6
d55e1c3e80c7f5e63d0ca5eee862fff147f3e0ea
Sergio Benitez
2017-03-20T22:50:36
Add `SameSite` cookie attribute. resolves #80
diff --git a/src/builder.rs b/src/builder.rs index bcdbbff..9d0cbc7 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -2,7 +2,7 @@ use std::borrow::Cow; use time::{Tm, Duration}; -use ::Cookie; +use ::{Cookie, SameSite}; /// Structure that follows the builder pattern for building `Cookie` structs. /// @@ -31...
4
182
7
af883188b1f4c5f4dd7175d59536a4b3a65977e4
Daniel Lockyer
2017-03-14T17:18:02
Simplify if-let expression
diff --git a/src/parse.rs b/src/parse.rs index 0e5be5b..8917d08 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -177,7 +177,7 @@ fn parse_inner<'c>(s: &str, decode: bool) -> Result<Cookie<'c>, ParseError> { .or_else(|_| time::strptime(v, "%a, %d-%b-%Y %H:%M:%S %Z")) .or_else(|_...
1
1
1
789b04771711db22642d744a475497120f563952
Daniel Lockyer
2017-03-14T17:17:48
Avoid needless borrowing
diff --git a/src/parse.rs b/src/parse.rs index e01d430..0e5be5b 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -116,8 +116,8 @@ fn parse_inner<'c>(s: &str, decode: bool) -> Result<Cookie<'c>, ParseError> { let (name, value) = if decode { name_val_decoded(name, value)? } else { - let name_inde...
1
4
4
7041c29da149bfa621a0efaec4ac8b7b603033e5
Daniel Lockyer
2017-03-14T17:09:47
Add backticks around structs and functions in documentation
diff --git a/src/builder.rs b/src/builder.rs index 1298cf8..bcdbbff 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -8,7 +8,7 @@ use ::Cookie; /// /// To construct a cookie: /// -/// 1. Call [Cookie::build](struct.Cookie.html#method.build) to start building. +/// 1. Call [`Cookie::build`](struct.Cookie.html#...
3
8
8
cf0724c0506224d4dfcda97b688531a84e71ee32
Alex Crichton
2017-03-08T19:15:59
Bump to 0.7.2
diff --git a/Cargo.toml b/Cargo.toml index 4c1c203..1bedd47 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>", "Sergio Benitez <sb@sergio.bz>"] -version = "0.7.1" +version = "0.7.2" license = "MIT/Apache-2.0" repository = "https://github.co...
1
1
1
74b9002f736d1fdad22a3350587dbfaabb18c773
Pyry Kontio
2017-02-15T18:32:51
Added methods to get slices borrowed from the original cookie string This makes it possible to parse a Cookie from a string and then get the name, value etc. of the parsed cookie with the lifetime of the original string, decoupled from the lifetime of the Cookie struct. Added methods: fn name_raw(&self) -> Option<&'c...
diff --git a/src/lib.rs b/src/lib.rs index 6986a0b..bdc43a1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -89,14 +89,6 @@ enum CookieStr { } impl CookieStr { - /// Whether this string is derived from indexes or not. - fn is_indexed(&self) -> bool { - match *self { - CookieStr::Indexed(..) => t...
1
190
12
cd3c71522e6b72f7680e461be5a5b51d61b00f70
Sergio Benitez
2017-03-07T08:48:42
Use base64 instead of rustc_serialize.
diff --git a/Cargo.toml b/Cargo.toml index 005475a..4c1c203 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>", "Sergio Benitez <sb@sergio.bz>"] -version = "0.7.0" +version = "0.7.1" license = "MIT/Apache-2.0" repository = "https://github.co...
4
10
14
4ba4735e23d2ec133b9b8ad2ca0ed9980cb32a95
Sergio Benitez
2017-03-01T08:04:53
Take crypto keys indirectly via 'Key' for improved security and usability.
diff --git a/src/jar.rs b/src/jar.rs index 3322d51..6a698d1 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -4,7 +4,7 @@ use std::mem::replace; use time::{self, Duration}; #[cfg(feature = "secure")] -use secure::{PrivateJar, SignedJar}; +use secure::{PrivateJar, SignedJar, Key}; use delta::DeltaCookie; use Cookie; ...
5
219
68
ab2339d4ff4c9722377b78e6452cafa0d830ec37
Sergio Benitez
2017-02-21T22:48:25
Rename DIGEST to HMAC_DIGEST.
diff --git a/src/secure/signed.rs b/src/secure/signed.rs index 3a9d4ee..1f2ec0d 100644 --- a/src/secure/signed.rs +++ b/src/secure/signed.rs @@ -6,7 +6,7 @@ use secure::rustc_serialize::base64::{ToBase64, FromBase64, STANDARD}; use {Cookie, CookieJar}; // Keep these three in sync, and keep the key len synced with t...
1
2
2
c9e869f3a74b5026a7081efa2ed65d9ed807b839
Sergio Benitez
2017-02-21T22:43:38
Update to ring 0.7.
diff --git a/Cargo.toml b/Cargo.toml index 948b807..005475a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,5 +18,5 @@ percent-encode = ["url"] [dependencies] time = "0.1" url = { version = "1.0", optional = true } -ring = { version = "0.6", optional = true } +ring = { version = "0.7", optional = true } rustc-seria...
2
5
5
2cb2916692041c6a709afc06277fd24bc0f1b8d0
Sergio Benitez
2017-02-21T22:35:48
Use 32-byte keys for HMAC-SHA256.
diff --git a/src/jar.rs b/src/jar.rs index a4c3845..3322d51 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -311,7 +311,8 @@ impl CookieJar { /// Returns a `PrivateJar` with `self` as its parent jar using the key `key` /// to sign/encrypt and verify/decrypt cookies added/retrieved from the /// child jar. The...
2
13
12
5d39c589478cafb768d92a2cafc5ce3c885f23f7
Sergio Benitez
2017-02-21T22:28:22
Store keys directly to afford a generic lifetime.
diff --git a/src/jar.rs b/src/jar.rs index 62baf51..a4c3845 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -347,7 +347,7 @@ impl CookieJar { /// assert!(jar.get("private").is_some()); /// ``` #[cfg(feature = "secure")] - pub fn private<'a, 'k>(&'a mut self, key: &'k [u8]) -> PrivateJar<'a, 'k> { + pub...
3
18
19
8b4c7260ae66ea1647e63be5fc7e8420fc21e12f
Sergio Benitez
2017-02-18T07:34:40
Make 'private' and 'signed' direct methods of 'CookieJar'.
diff --git a/src/jar.rs b/src/jar.rs index 94c8605..62baf51 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -3,6 +3,8 @@ use std::mem::replace; use time::{self, Duration}; +#[cfg(feature = "secure")] +use secure::{PrivateJar, SignedJar}; use delta::DeltaCookie; use Cookie; @@ -305,6 +307,93 @@ impl CookieJar { ...
4
130
120
182463323bc90a4a22cd007a81fe6998128ff9e1
Sergio Benitez
2017-02-18T04:07:55
Base64 encode the nonce and sealed value together.
diff --git a/src/secure/private.rs b/src/secure/private.rs index 82653ea..ecd6bc0 100644 --- a/src/secure/private.rs +++ b/src/secure/private.rs @@ -10,7 +10,6 @@ use {Cookie, CookieJar}; static ALGO: &'static Algorithm = &AES_256_GCM; const KEY_LEN: usize = 32; const NONCE_LEN: usize = 12; -const BASE64_NONCE_LEN: ...
1
29
34
6aa7ced470e04bea7e561d5b1f9f5854318f45f7
Sergio Benitez
2017-02-18T03:33:15
Make unseal and verify not panic on bad value lengths.
diff --git a/src/secure/private.rs b/src/secure/private.rs index 893eadd..82653ea 100644 --- a/src/secure/private.rs +++ b/src/secure/private.rs @@ -83,11 +83,11 @@ impl<'a, 'k> PrivateJar<'a, 'k> { /// Given a sealed value `str` where the nonce is prepended to `value`, /// verifies and decrypts the sealed va...
2
8
16
9357bce5ae1ecbc19e4866fbd79a678a47448543
Sergio Benitez
2017-02-17T23:54:10
Rename CookieJar::find to CookieJar::get.
diff --git a/src/jar.rs b/src/jar.rs index ffda022..94c8605 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -27,7 +27,7 @@ use Cookie; /// /// Cookies can be added via [add](#method.add) and removed via /// [remove](#method.remove). Finally, cookies can be looked up via -/// [find](#method.find): +/// [get](#method.get)...
4
64
64
ad1ec04fa9c6ed19abc366048ba9bd9c25c6c444
Sergio Benitez
2017-02-08T09:35:02
Clean up key = value parsing.
diff --git a/src/parse.rs b/src/parse.rs index 8956809..e01d430 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -102,13 +102,10 @@ fn parse_inner<'c>(s: &str, decode: bool) -> Result<Cookie<'c>, ParseError> { }; // Determine the name = val. - let (name, value) = - if let Some(i) = key_value.find('...
1
4
7
904b3370c1b5fd63c31477218eceb723748cb74a
Alex Crichton
2017-02-28T17:28:15
Bump to 0.6.1
diff --git a/Cargo.toml b/Cargo.toml index f2efe59..d7c34c5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>", "Sergio Benitez <sb@sergio.bz>"] -version = "0.6.0" +version = "0.6.1" license = "MIT/Apache-2.0" repository = "https://github.co...
1
1
1
11b5ef1bc5dafb635fb8a36437484e3e8f209211
Toralf Wittner
2017-01-26T16:37:18
Fix parser. According to RFC 6265 cookie values may contain '=' characters. The current parser implementation only considers a cookie value up to the first occurrence of '=' and ignores the rest. This commit splits the parse string only at the first position of '=' and retains the cookie value as is.
diff --git a/src/parse.rs b/src/parse.rs index ce30cfe..8956809 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -102,12 +102,13 @@ fn parse_inner<'c>(s: &str, decode: bool) -> Result<Cookie<'c>, ParseError> { }; // Determine the name = val. - let mut splits = key_value.split('='); - let (name, value) ...
1
10
6
d9a469bdca05ac7c4710059e05a200548231f46a
Alex Crichton
2017-01-26T00:40:43
Update Cargo.toml metadata
diff --git a/Cargo.toml b/Cargo.toml index 9886459..f2efe59 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Alex Crichton <alex@alexcrichton.com>", "Sergio Benitez <sb@sergio.b version = "0.6.0" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" -documentation = ...
1
1
1
a0b268ed166e3c8f88d0aee60d4f2553058f4fd7
Alex Crichton
2017-01-26T00:39:44
Add a doc url to the crate
diff --git a/src/lib.rs b/src/lib.rs index a61b580..6986a0b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -53,6 +53,7 @@ //! features = ["secure", "percent-encode"] //! ``` +#![doc(html_root_url = "https://docs.rs/cookie/0.6")] #![deny(missing_docs)] #![cfg_attr(test, deny(warnings))]
1
1
0
a7b6b2a9914e4b4e84f885e0af4f2986a5a250a4
Alex Crichton
2017-01-26T00:39:10
Clarify CookieJar::new for non-secure jars
diff --git a/src/jar.rs b/src/jar.rs index b1c9b2b..8fb3a0f 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -68,7 +68,8 @@ pub struct Iter<'a> { impl<'a> CookieJar<'a> { /// Creates a new empty cookie jar with the given signing key. /// - /// The given key is used to sign cookies in the signed cookie jar. + ...
1
2
1
a48ec41617400e5267c47e65f1f1d24d11e32e87
Alex Crichton
2017-01-26T00:36:17
Remove unsafety from `into_owned`
diff --git a/src/lib.rs b/src/lib.rs index 09ed485..a61b580 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -286,24 +286,18 @@ impl<'c> Cookie<'c> { /// let owned_cookie = c.into_owned(); /// assert_eq!(owned_cookie.name_value(), ("a", "b")); /// ``` - #[inline] - pub fn into_owned(mut self) -> Cookie<...
1
12
18
4b6f2462b780bc16a664c0cba1f23e7e240c46b5
Alex Crichton
2017-01-26T00:32:13
Disable `secure` feature by default Enough problems with OpenSSL that let's not enable this by default.
diff --git a/Cargo.toml b/Cargo.toml index dd3c45a..9886459 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,6 @@ similar to Rails' cookie jar. """ [features] -default = ["secure"] secure = ["openssl", "rustc-serialize"] percent-encode = ["url"] diff --git a/src/jar.rs b/src/jar.rs index bb9f1d6..b1c9b2b 1...
3
16
5
2eb391269f86bf229220577120bc16a7bed86cbe
Alex Crichton
2017-01-26T00:31:48
Remove ParseError::Internal If it's internal, it should be a panic!
diff --git a/src/parse.rs b/src/parse.rs index fe6bea9..ce30cfe 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -20,8 +20,6 @@ pub enum ParseError { EmptyName, /// Decoding the cookie's name or value resulted in invalid UTF-8. Utf8Error(Utf8Error), - /// Internal error: this should not occur. - Int...
1
5
10
e145ef37b622d946d9aacc53d3c67e45510c1db5
Alex Crichton
2017-01-26T00:29:49
Enable deny(missing_docs)
diff --git a/src/lib.rs b/src/lib.rs index 6b5d3a1..27aafb1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,3 @@ -// #![deny(missing_docs)] -// #![cfg_attr(test, deny(warnings))] - //! HTTP Cookie parsing and Cookie Jar management. //! //! This crates provides the [Cookie](struct.Cookie.html) type, which directl...
2
4
3
d17376bfa6070d7119b4af1c411e3a948f5ae6cc
Alex Crichton
2017-01-26T00:29:25
Remove `pub` from private functions
diff --git a/src/lib.rs b/src/lib.rs index 132e16e..6b5d3a1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -89,7 +89,7 @@ enum CookieStr { impl CookieStr { /// Whether this string is derived from indexes or not. - pub fn is_indexed(&self) -> bool { + fn is_indexed(&self) -> bool { match *self { ...
1
2
2
156ed4002d6f6256525255b84c6f88692c2117e0
Sergio Benitez
2017-01-24T19:44:40
Stop using inline(always). Use inline only for non-generic functions.
diff --git a/src/builder.rs b/src/builder.rs index 4d8a71f..d03045a 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -52,7 +52,6 @@ impl CookieBuilder { /// let c = Cookie::build("foo", "bar").finish(); /// assert_eq!(c.name_value(), ("foo", "bar")); /// ``` - #[inline(always)] pub fn new<N, V...
2
10
21
29d28088ae443ec1cc700ca8c02dc3661009ce18
Sergio Benitez
2017-01-24T19:39:26
Add `parse_encoded` and `encoded` methods. Remove `parse_static`. Previously, the inclusion of the `percent-encoded` feature solely determined whether the name/value of a cookie would be percent-encoded/decoded. This commit removes this functionality opting instead for explicit methods: `encoded` to get a percent-enco...
diff --git a/src/lib.rs b/src/lib.rs index daeab05..8379337 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -40,11 +40,14 @@ //! //! Enables percent encoding and decoding of names and values in cookies. //! -//! When this feature is enabled, cookie name and values will be -//! percent-encoded when `to_string` is c...
2
172
120
1c2398c809ad714a25c66bbe8765c66f05cd884c
Sergio Benitez
2017-01-20T01:08:02
Discourage exhaustive matching of ParseError.
diff --git a/src/parse.rs b/src/parse.rs index 7592025..475fdd3 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -22,6 +22,10 @@ pub enum ParseError { Utf8Error(Utf8Error), /// Internal error: this should not occur. Internal, + /// It is discouraged to exhaustively match on this enum as its variants ma...
1
5
0
477ee390fd8fc274eba3e337dfad2fcc060d92e7
Sergio Benitez
2017-01-19T19:58:10
Don't export the CookeStr type.
diff --git a/src/lib.rs b/src/lib.rs index e543cb1..daeab05 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -76,9 +76,8 @@ pub use parse::ParseError; pub use builder::CookieBuilder; pub use jar::CookieJar; -#[doc(hidden)] #[derive(Debug, Clone)] -pub enum CookieStr { +enum CookieStr { /// An string derived from i...
1
1
2
bea37eee29a245ec5cee408d0e50a37f9ca18a3f
Sergio Benitez
2017-01-18T22:17:53
Bump version to 0.6.0.
diff --git a/Cargo.toml b/Cargo.toml index b591721..dd3c45a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>", "Sergio Benitez <sb@sergio.bz>"] -version = "0.5.1" +version = "0.6.0" license = "MIT/Apache-2.0" repository = "https://github.co...
1
1
1
f22dd90b2ef73230e5e75432c9fd5464969088d9
Alex Crichton
2016-12-29T18:33:07
Bump to 0.5.1
diff --git a/Cargo.toml b/Cargo.toml index 14754c2..5fa1299 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.5.0" +version = "0.5.1" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docume...
1
1
1
d7acf03f70a17c133cda5d6ef48267c766fca36d
Alex Crichton
2016-12-29T18:32:41
Revert behavior of signing the entire cookie Browsers only send values, so we don't have the whole cookie to verify ...
diff --git a/src/jar.rs b/src/jar.rs index 1114199..ce632ce 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -387,7 +387,7 @@ mod secure { // https://github.com/rails/rails/blob/master/activesupport/lib // /active_support/message_verifier.rb#L70 pub fn sign(key: &[u8], mut cookie: Cookie) ->...
1
2
9
1c5c1a4a3a6efaf923ea5806b0e1f121f01f5e62
Alex Crichton
2016-12-29T15:58:57
Bump to 0.5.0
diff --git a/Cargo.toml b/Cargo.toml index e7dd343..14754c2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.4.0" +version = "0.5.0" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docume...
1
1
1
9e4baf40ebe59b025b7e9a63b50dcc0460dc78a5
Alex Crichton
2016-12-28T18:45:34
Keep Error opaque
diff --git a/src/lib.rs b/src/lib.rs index 76a92fb..cfbc207 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -60,7 +60,7 @@ pub struct Cookie { /// Crate-level error type used to indicate a problem with parsing #[derive(Debug)] -pub struct Error; +pub struct Error(()); impl Cookie { /// Creates a new `Cookie` in...
1
4
4
c8fb121067d7a23e005b685e792633f3d29ec75b
Peter Atashian
2016-05-16T07:49:17
Get rid of url encoding in cookies. Signed-off-by: Peter Atashian <retep998@gmail.com>
diff --git a/src/lib.rs b/src/lib.rs index 6cf93f9..76a92fb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -58,24 +58,9 @@ pub struct Cookie { pub custom: BTreeMap<String, String>, } -/// Crate-level error type used to indicate either a problem with parsing, or a UTF-8 issue +/// Crate-level error type used to ind...
1
11
32
3a6a14cad90c1e727b30b5470c7184bd22d5a226
Corey Farwell
2016-12-05T00:11:23
Remove extraaneous whitespace.
diff --git a/src/lib.rs b/src/lib.rs index 6350f3b..6cf93f9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -21,7 +21,7 @@ extern crate url; extern crate time; -#[cfg(feature = "serialize-rustc")] extern crate rustc_serialize; +#[cfg(feature = "serialize-rustc")] extern crate rustc_serialize; #[cfg(feature = "serial...
1
1
1
c453341cd18014f34aa0e1f50c53cb841476e943
Alex Crichton
2016-11-21T15:56:57
Bump to 0.4.0
diff --git a/Cargo.toml b/Cargo.toml index d5bbe08..e7dd343 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.3.1" +version = "0.4.0" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docume...
1
1
1
b4bf8b4644c3ab212327a5fa6e104aa358b49aa2
Markus Unterwaditzer
2016-11-08T22:18:25
Fix test failures
diff --git a/src/jar.rs b/src/jar.rs index 659bf07..1114199 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -410,18 +410,17 @@ mod secure { } pub fn design(key: &[u8], mut cookie: Cookie) -> Option<Cookie> { - let len = { - let (text, signature) = match split_value(&cookie.value) { - ...
1
10
11
6387437e0a446a32cf145fd71f24351960cb7abe
Markus Unterwaditzer
2016-11-08T22:14:59
Fix compilation errors
diff --git a/src/jar.rs b/src/jar.rs index 1265360..659bf07 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -544,7 +544,7 @@ mod test { $c.$secure().add(Cookie::new("test".to_string(), "test".to_string())); assert!($c.$secure().find("test").unwrap().value == "test"); let mut cookie = ...
1
1
1
907660395e506c7db9440a579eb36d0bacdadf7d
Markus Unterwaditzer
2016-11-08T22:12:21
Fix impotent crypto tests
diff --git a/src/jar.rs b/src/jar.rs index d3d5753..1265360 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -550,14 +550,14 @@ mod test { }) } - #[cfg(features = "secure")] + #[cfg(feature = "secure")] #[test] fn signed() { let c = CookieJar::new(KEY); secure_behaviour!(c, ...
1
2
2
8ecd5c456dbd755727b8353086f20bb924c58380
Markus Unterwaditzer
2016-11-06T21:43:18
Sign entire cookie Fix #62
diff --git a/src/jar.rs b/src/jar.rs index 387c248..d3d5753 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -387,7 +387,7 @@ mod secure { // https://github.com/rails/rails/blob/master/activesupport/lib // /active_support/message_verifier.rb#L70 pub fn sign(key: &[u8], mut cookie: Cookie) ->...
1
9
2
b9620ee28816ea5e2ab771fd69e5b031bece961c
Alex Crichton
2016-11-06T05:22:49
Update to openssl 0.9.0
diff --git a/Cargo.toml b/Cargo.toml index 5210b8e..d5bbe08 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ serialize-serde = ["serde"] url = "1.0" time = "0.1" rustc-serialize = { version = "0.3", optional = true } -openssl = { version = "0.8.0", optional = true, features = ["hmac"] } +openssl = { versio...
2
13
10
5060bf0d3384bedd967d997d9fbd0ac488f4e752
Paul Woolcock
2016-10-28T18:20:01
Add some more docs Adds the `#[deny(missing_docs)]` attribute and add docs to get it to compile
diff --git a/src/lib.rs b/src/lib.rs index 10ed81e..1b83a46 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,24 @@ +#![deny(missing_docs)] #![doc(html_root_url = "http://alexcrichton.com/cookie-rs")] #![cfg_attr(test, deny(warnings))] +//! HTTP Cookie parsing and Cookie Jar management +//! +//! Usage: +//! +//! ...
1
54
0
c481519d681c1bd86a3624c3ff2f455dd9c3ed15
Alex Crichton
2016-10-13T05:55:40
Bump to 0.3.1 Closes #60
diff --git a/Cargo.toml b/Cargo.toml index 8756ffa..5210b8e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.3.0" +version = "0.3.1" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docume...
1
1
1
b824f7aadc812724e82ec053a7457b2322d9efcd
Alexander Regueiro
2016-10-07T17:43:34
Added test for new `clear` method on `CookieJar`.
diff --git a/src/jar.rs b/src/jar.rs index ee49ef2..80dcf90 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -513,6 +513,13 @@ mod test { assert!(c.find("test").is_none()); assert!(c.find("test2").is_some()); + + c.add(Cookie::new("test3".to_string(), "".to_string())); + c.clear(); + + ...
1
7
0
62032c1765d731d5fec585ac8c45cb120c30366a
Alexander Regueiro
2016-10-07T15:09:39
Added `Clear` method to `CookieJar`.
diff --git a/src/jar.rs b/src/jar.rs index 623eeb2..ee49ef2 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -158,6 +158,15 @@ impl<'a> CookieJar<'a> { root.removed_cookies.borrow_mut().insert(cookie); } + /// Clears all cookies from this cookie jar. + pub fn clear(&self) { + let root = self.roo...
1
9
0
4a1e678a5ebfd4d392af252a42219528868b3c34
Alexander Regueiro
2016-10-07T01:15:06
Added `Debug` implementation for `CargoJar`.
diff --git a/src/jar.rs b/src/jar.rs index 734d207..623eeb2 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -13,6 +13,7 @@ use std::collections::{HashMap, HashSet}; use std::cell::RefCell; +use std::fmt; use time; use Cookie; @@ -86,7 +87,6 @@ pub struct Iter<'a> { keys: Vec<String>, } - impl<'a> CookieJar...
1
18
1
3dcbde55d349010c85b90cc3aee6984820cf3a26
Laurent Arnoud
2016-09-07T18:46:21
Opaque struct to avoid API breaking with public enum
diff --git a/src/lib.rs b/src/lib.rs index 75a5159..10ed81e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -31,15 +31,20 @@ pub struct Cookie { } #[derive(Debug)] -pub enum CookieError { - ParseError, - Utf8Error(std::str::Utf8Error), +pub struct Error { + inner: ErrorInner, } -fn percent_decode(input: &st...
1
29
15