diff options
Diffstat (limited to 'webd/src')
| -rw-r--r-- | webd/src/session.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/webd/src/session.rs b/webd/src/session.rs index 8a20721..3b34f47 100644 --- a/webd/src/session.rs +++ b/webd/src/session.rs | |||
| @@ -575,7 +575,12 @@ mod tests { | |||
| 575 | let id = "a".repeat(64); | 575 | let id = "a".repeat(64); |
| 576 | assert_eq!( | 576 | assert_eq!( |
| 577 | cookie_id(&format!("other=1; {COOKIE_NAME}={id}; theme=dark")), | 577 | cookie_id(&format!("other=1; {COOKIE_NAME}={id}; theme=dark")), |
| 578 | Some(id) | 578 | Some(id.clone()) |
| 579 | ); | ||
| 580 | assert_eq!( | ||
| 581 | cookie_id(&format!("{HOST_COOKIE_NAME}={id}")), | ||
| 582 | Some(id), | ||
| 583 | "the secure __Host- name is accepted" | ||
| 579 | ); | 584 | ); |
| 580 | assert_eq!(cookie_id(&format!("{COOKIE_NAME}=short")), None); | 585 | assert_eq!(cookie_id(&format!("{COOKIE_NAME}=short")), None); |
| 581 | assert_eq!(cookie_id("other=1"), None); | 586 | assert_eq!(cookie_id("other=1"), None); |
