()
| 545 | |
| 546 | #[tokio::test] |
| 547 | async fn test_file_store_backslash_sanitization() { |
| 548 | let dir = tempdir().unwrap(); |
| 549 | let store = FileSessionStore::new(dir.path()).await.unwrap(); |
| 550 | |
| 551 | let mut session = create_test_session_data(); |
| 552 | session.id = r"foo\bar\baz".to_string(); |
| 553 | store.save(&session).await.unwrap(); |
| 554 | |
| 555 | let loaded = store.load(&session.id).await.unwrap(); |
| 556 | assert!(loaded.is_some()); |
| 557 | |
| 558 | let loaded = loaded.unwrap(); |
| 559 | assert_eq!(loaded.id, session.id); |
| 560 | |
| 561 | // Verify the file on disk uses sanitized name |
| 562 | let expected_path = dir.path().join("foo_bar_baz.json"); |
| 563 | assert!(expected_path.exists()); |
| 564 | } |
| 565 | |
| 566 | #[tokio::test] |
| 567 | async fn test_file_store_mixed_separator_sanitization() { |
nothing calls this directly
no test coverage detected