diff --git a/.cargo/snapchat-dpo-mail.txt b/.cargo/snapchat-dpo-mail.txt new file mode 100644 index 0000000..3160857 --- /dev/null +++ b/.cargo/snapchat-dpo-mail.txt @@ -0,0 +1,44 @@ +Dear Snap Data Protection Officer, + +I am writing to exercise my right to erasure under Article 17 of the GDPR in relation to two Snapchat accounts that belong to me: + +alexemmet + +alex_emmet + +I previously contacted Snapchat Support through X, formerly Twitter, because I was unable to identify a functioning general support email address or reach a human support representative through the available support channels. + +In my message through X, I explained that I am requesting deletion of both accounts and the personal data associated with them. + +I still have access to the login credentials for alexemmet and can verify ownership of that account through the normal account-access process. + +For alex_emmet, I no longer have access to the old device, email address, or phone number that may have been associated with the account. The account was created when I was under 18. + +Snapchat Support responded through X that it could not take action where a user does not know, or no longer has access to, the email address or phone number associated with an account. + +I would like to clarify that I am not requesting account recovery, a password reset, or restored access to alex_emmet. I am making a data-subject request for erasure of my personal data. + +I understand that Snap is entitled to verify my identity before acting on this request. Under Article 12(6) GDPR, where there are reasonable doubts concerning the identity of the person making a request, the controller may request additional information necessary to confirm the person's identity. + +I am therefore asking Snap to provide an alternative means of verifying that I am the data subject associated with alex_emmet, given that I no longer have access to the original device, email address, or phone number. I am willing to provide reasonable information necessary for verification through a secure channel. + +My request covers: + +deletion of the Snapchat account alexemmet; + +deletion of the Snapchat account alex_emmet; + +erasure of personal data associated with both accounts; + +erasure of personal data contained in previous support correspondence, support tickets, attachments, account-recovery records, and associated metadata concerning me. + +If Snap considers that any of this data must be retained, please identify the categories of data being retained, the legal basis for retention, and the applicable retention period. + +If Snap considers that it cannot comply with the erasure request for alex_emmet, please provide the specific reason for that decision and explain why no alternative method of verifying my identity is available. + +I would also appreciate confirmation that this request is being handled as a GDPR data-subject request rather than as an account-recovery request. + +I can provide screenshots of my correspondence with Snapchat Support through X if required. + +Kind regards, +Alex diff --git a/.gitignore b/.gitignore index 176ffc8..1c5c7c6 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ target # Added by cargo /target +/certs *.mk *.mpkb diff --git a/Cargo.lock b/Cargo.lock index ca152b0..ee77e55 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -86,7 +86,7 @@ checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.4", ] [[package]] @@ -252,12 +252,12 @@ dependencies = [ [[package]] name = "chacha20" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" dependencies = [ "cfg-if", - "cpufeatures 0.3.0", + "cpufeatures 0.3.1", "rand_core 0.10.1", ] @@ -302,9 +302,9 @@ checksum = "0c9ea0ac24bc397ab3c98583a3c9ba74fa56b09a4449bbe172b9b1ddb016027a" [[package]] name = "combine" -version = "4.6.7" +version = "4.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +checksum = "cfc320937d09e6de266b31b9afb480f197d7a861be86be7cb2ea7e5d1bfffc5e" dependencies = [ "bytes", "memchr", @@ -349,9 +349,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566" dependencies = [ "libc", ] @@ -439,7 +439,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5eed333089e2e1c1ac8c6c0398e5e2497b4c9926ca6d0365ed1e099afa5bc23" dependencies = [ "cfg-if", - "cpufeatures 0.3.0", + "cpufeatures 0.3.1", "curve25519-dalek-derive", "digest 0.11.3", "fiat-crypto 0.3.0", @@ -553,7 +553,7 @@ checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.4", ] [[package]] @@ -792,7 +792,7 @@ checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.4", ] [[package]] @@ -863,9 +863,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.18" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "839c0e8a181239723652be9062bb56ca5bf5f64011f73b623f6f4fc59086a228" +checksum = "ef8e5e5a340588f4452631496976cf8636d4a7ecf600239fdc27615d2530bc16" dependencies = [ "atomic-waker", "bytes", @@ -1336,7 +1336,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8f198d1db720e4940b5a493201d199d9f24f568f8f746bd13706243a2f71598" dependencies = [ "cfg-if", - "cpufeatures 0.3.0", + "cpufeatures 0.3.1", ] [[package]] @@ -1362,9 +1362,9 @@ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "libredox" -version = "0.1.20" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d0a00925a9f930d679b6789b721e3a7f9ed110f41b86d2497caa780c3a070a" +checksum = "d7955dfc218a8afb29dfeffd540e3a6e96baeb94fe7138228dd7cc6937fbbf96" dependencies = [ "bitflags", "libc", @@ -1498,7 +1498,7 @@ dependencies = [ [[package]] name = "mtp" version = "0.3.0" -source = "git+https://git.methanium.net/Methanium/mtp.git#101b8322a1eb76490fee70c4606c7ded18327fe9" +source = "git+https://git.methanium.net/Methanium/mtp.git#f6a8b464e0daae6c7753208f3d8601d21cd47ab2" dependencies = [ "mtp-client", "mtp-codec", @@ -1514,7 +1514,7 @@ dependencies = [ [[package]] name = "mtp-client" version = "0.3.0" -source = "git+https://git.methanium.net/Methanium/mtp.git#101b8322a1eb76490fee70c4606c7ded18327fe9" +source = "git+https://git.methanium.net/Methanium/mtp.git#f6a8b464e0daae6c7753208f3d8601d21cd47ab2" dependencies = [ "mtp-codec", "mtp-common", @@ -1527,7 +1527,7 @@ dependencies = [ [[package]] name = "mtp-codec" version = "0.3.0" -source = "git+https://git.methanium.net/Methanium/mtp.git#101b8322a1eb76490fee70c4606c7ded18327fe9" +source = "git+https://git.methanium.net/Methanium/mtp.git#f6a8b464e0daae6c7753208f3d8601d21cd47ab2" dependencies = [ "base64 0.23.1", "byteorder", @@ -1541,10 +1541,9 @@ dependencies = [ [[package]] name = "mtp-common" version = "0.3.0" -source = "git+https://git.methanium.net/Methanium/mtp.git#101b8322a1eb76490fee70c4606c7ded18327fe9" +source = "git+https://git.methanium.net/Methanium/mtp.git#f6a8b464e0daae6c7753208f3d8601d21cd47ab2" dependencies = [ "quinn", - "rustls", "thiserror 2.0.20", "wtransport", ] @@ -1552,7 +1551,7 @@ dependencies = [ [[package]] name = "mtp-crypto" version = "0.3.0" -source = "git+https://git.methanium.net/Methanium/mtp.git#101b8322a1eb76490fee70c4606c7ded18327fe9" +source = "git+https://git.methanium.net/Methanium/mtp.git#f6a8b464e0daae6c7753208f3d8601d21cd47ab2" dependencies = [ "argon2", "base64 0.22.1", @@ -1575,7 +1574,7 @@ dependencies = [ [[package]] name = "mtp-files" version = "0.3.0" -source = "git+https://git.methanium.net/Methanium/mtp.git#101b8322a1eb76490fee70c4606c7ded18327fe9" +source = "git+https://git.methanium.net/Methanium/mtp.git#f6a8b464e0daae6c7753208f3d8601d21cd47ab2" dependencies = [ "mtp-crypto", "rand 0.10.2", @@ -1586,7 +1585,7 @@ dependencies = [ [[package]] name = "mtp-host" version = "0.3.0" -source = "git+https://git.methanium.net/Methanium/mtp.git#101b8322a1eb76490fee70c4606c7ded18327fe9" +source = "git+https://git.methanium.net/Methanium/mtp.git#f6a8b464e0daae6c7753208f3d8601d21cd47ab2" dependencies = [ "mtp-codec", "mtp-common", @@ -1602,7 +1601,7 @@ dependencies = [ [[package]] name = "mtp-transport" version = "0.3.0" -source = "git+https://git.methanium.net/Methanium/mtp.git#101b8322a1eb76490fee70c4606c7ded18327fe9" +source = "git+https://git.methanium.net/Methanium/mtp.git#f6a8b464e0daae6c7753208f3d8601d21cd47ab2" dependencies = [ "async-trait", "mtp-codec", @@ -1622,7 +1621,7 @@ dependencies = [ [[package]] name = "mtp-type-map" version = "0.3.0" -source = "git+https://git.methanium.net/Methanium/mtp.git#101b8322a1eb76490fee70c4606c7ded18327fe9" +source = "git+https://git.methanium.net/Methanium/mtp.git#f6a8b464e0daae6c7753208f3d8601d21cd47ab2" dependencies = [ "serde", "serde_yaml", @@ -1631,7 +1630,7 @@ dependencies = [ [[package]] name = "mtp-webserver" version = "0.3.0" -source = "git+https://git.methanium.net/Methanium/mtp.git#101b8322a1eb76490fee70c4606c7ded18327fe9" +source = "git+https://git.methanium.net/Methanium/mtp.git#f6a8b464e0daae6c7753208f3d8601d21cd47ab2" dependencies = [ "async-trait", "bytes", @@ -1687,7 +1686,7 @@ dependencies = [ "num-integer", "num-iter", "num-traits", - "rand 0.8.7", + "rand 0.8.8", "smallvec", "zeroize", ] @@ -2034,9 +2033,9 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" [[package]] name = "rand" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22f6172bdec972074665ed81ed53b71da00bfc44b65a753cfde883ec4c702a1a" +checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c" dependencies = [ "libc", "rand_chacha", @@ -2049,7 +2048,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80" dependencies = [ - "chacha20 0.10.1", + "chacha20 0.10.2", "getrandom 0.4.3", "rand_core 0.10.1", ] @@ -2348,7 +2347,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.4", ] [[package]] @@ -2418,7 +2417,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" dependencies = [ "cfg-if", - "cpufeatures 0.3.0", + "cpufeatures 0.3.1", "digest 0.11.3", ] @@ -2675,7 +2674,7 @@ dependencies = [ "memchr", "once_cell", "percent-encoding", - "rand 0.8.7", + "rand 0.8.8", "rsa", "serde", "sha1", @@ -2713,7 +2712,7 @@ dependencies = [ "md-5", "memchr", "once_cell", - "rand 0.8.7", + "rand 0.8.8", "serde", "serde_json", "sha2 0.10.9", @@ -2785,9 +2784,9 @@ dependencies = [ [[package]] name = "syn" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" +checksum = "e6275cddf4610d1775e6d1fe9469b2e77d0f39fd98fb7450901b821e0c53649f" dependencies = [ "proc-macro2", "quote", @@ -2842,7 +2841,7 @@ checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.4", ] [[package]] @@ -2925,7 +2924,7 @@ checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.4", ] [[package]] @@ -3077,9 +3076,9 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "uuid" -version = "1.25.0" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f053576934f05a761a402421fbbe3d425d9366f75f978806a037b3ca481abecc" +checksum = "b5772d71c9be8a8a6ac2117d949c5b224c1b72241bb611d9a3012edcf8af7812" dependencies = [ "getrandom 0.4.3", "js-sys", @@ -3576,7 +3575,7 @@ checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.4", ] [[package]] diff --git a/flake.nix b/flake.nix index 1d48d42..e149cab 100644 --- a/flake.nix +++ b/flake.nix @@ -144,7 +144,7 @@ bindAddress = lib.mkOption { type = lib.types.str; default = "0.0.0.0"; - description = "IP address to bind the HTTP/API server to."; + description = "IP address to bind the MTP/QUIC server to."; }; openFirewall = lib.mkOption { diff --git a/mtp-type-maps b/mtp-type-maps index a297dcc..486541b 160000 --- a/mtp-type-maps +++ b/mtp-type-maps @@ -1 +1 @@ -Subproject commit a297dcce60bc6e84696c6a16f5fd510beb2ca643 +Subproject commit 486541b9483356ff49ff3ec7016f87d3ecbeaa0e diff --git a/src/transport/omikron_connection.rs b/src/transport/omikron_connection.rs index 83a9df7..8c536c7 100644 --- a/src/transport/omikron_connection.rs +++ b/src/transport/omikron_connection.rs @@ -15,7 +15,7 @@ use mtp::{ webserver::{MTPWebServer, WebMtpReceiver, WebMtpSender}, }; use std::{ - net::{IpAddr, Ipv4Addr}, + net::IpAddr, sync::{ Arc, Mutex as StdMutex, atomic::{AtomicU32, AtomicUsize, Ordering}, @@ -30,11 +30,19 @@ use tokio_util::{sync::CancellationToken, task::TaskTracker}; const CLEANUP_INTERVAL: Duration = Duration::from_secs(30); const MAX_WAITING_AGE: Duration = Duration::from_secs(60); +const DEFAULT_BIND_ADDRESS: &str = "0.0.0.0"; static ACTIVE_CONNECTIONS: AtomicUsize = AtomicUsize::new(0); static NEXT_CORRELATION_ID: AtomicU32 = AtomicU32::new(1); static ACTIVE_CONNECTIONS_BY_IP: once_cell::sync::Lazy> = once_cell::sync::Lazy::new(DashMap::new); +fn parse_bind_address(value: Option<&str>) -> Result { + value + .unwrap_or(DEFAULT_BIND_ADDRESS) + .trim() + .parse::() +} + struct ConnectionLimitGuard(Option); impl Drop for ConnectionLimitGuard { fn drop(&mut self) { @@ -666,7 +674,7 @@ pub async fn start(port: u16, state: Arc) -> Result<(), Box, version: Version) - let key_str = key.to_string(); match value { - DataValue::Str(s) => format!("{}=\"{}\"", key_str, s), + DataValue::Str(s) => format!("{}=\"{}\"", key_str, abbreviate_string(&s)), DataValue::Container(inner) => { let inner_formatted = format_data_container(inner, version.clone()); @@ -304,7 +304,7 @@ fn format_array(arr: Vec, version: Version) -> String { let parts: Vec = arr .into_iter() .map(|value| match value { - DataValue::Str(s) => format!("\"{}\"", s), + DataValue::Str(s) => format!("\"{}\"", abbreviate_string(&s)), DataValue::Container(inner) => { let inner_formatted = format_data_container(inner, version.clone()); @@ -329,6 +329,32 @@ fn format_array(arr: Vec, version: Version) -> String { parts.join(", ") } + +fn abbreviate_string(value: &str) -> String { + const EDGE_LENGTH: usize = 4; + + let chars: Vec = value.chars().collect(); + if chars.len() <= EDGE_LENGTH * 2 { + return value.to_string(); + } + + let prefix: String = chars.iter().take(EDGE_LENGTH).collect(); + let suffix: String = chars.iter().rev().take(EDGE_LENGTH).rev().collect(); + format!("{prefix}...{suffix}") +} + +#[cfg(test)] +mod tests { + use super::abbreviate_string; + + #[test] + fn abbreviates_only_strings_longer_than_eight_characters() { + assert_eq!(abbreviate_string("12345678"), "12345678"); + assert_eq!(abbreviate_string("123456789"), "1234...6789"); + assert_eq!(abbreviate_string("YWJjZGVmZ2hpag=="), "YWJj...ag=="); + } +} + #[macro_export] macro_rules! log_cv { ($kind:expr, $cv:expr) => {