Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 47d6495b60 | |||
|
|
84a56678e0 |
7 changed files with 126 additions and 48 deletions
44
.cargo/snapchat-dpo-mail.txt
Normal file
44
.cargo/snapchat-dpo-mail.txt
Normal file
|
|
@ -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
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -27,6 +27,7 @@ target
|
||||||
# Added by cargo
|
# Added by cargo
|
||||||
|
|
||||||
/target
|
/target
|
||||||
|
/certs
|
||||||
|
|
||||||
*.mk
|
*.mk
|
||||||
*.mpkb
|
*.mpkb
|
||||||
|
|
|
||||||
83
Cargo.lock
generated
83
Cargo.lock
generated
|
|
@ -86,7 +86,7 @@ checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 3.0.3",
|
"syn 3.0.4",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -252,12 +252,12 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "chacha20"
|
name = "chacha20"
|
||||||
version = "0.10.1"
|
version = "0.10.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81"
|
checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"cpufeatures 0.3.0",
|
"cpufeatures 0.3.1",
|
||||||
"rand_core 0.10.1",
|
"rand_core 0.10.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -302,9 +302,9 @@ checksum = "0c9ea0ac24bc397ab3c98583a3c9ba74fa56b09a4449bbe172b9b1ddb016027a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "combine"
|
name = "combine"
|
||||||
version = "4.6.7"
|
version = "4.6.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd"
|
checksum = "cfc320937d09e6de266b31b9afb480f197d7a861be86be7cb2ea7e5d1bfffc5e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"memchr",
|
"memchr",
|
||||||
|
|
@ -349,9 +349,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cpufeatures"
|
name = "cpufeatures"
|
||||||
version = "0.3.0"
|
version = "0.3.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201"
|
checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
@ -439,7 +439,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b5eed333089e2e1c1ac8c6c0398e5e2497b4c9926ca6d0365ed1e099afa5bc23"
|
checksum = "b5eed333089e2e1c1ac8c6c0398e5e2497b4c9926ca6d0365ed1e099afa5bc23"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"cpufeatures 0.3.0",
|
"cpufeatures 0.3.1",
|
||||||
"curve25519-dalek-derive",
|
"curve25519-dalek-derive",
|
||||||
"digest 0.11.3",
|
"digest 0.11.3",
|
||||||
"fiat-crypto 0.3.0",
|
"fiat-crypto 0.3.0",
|
||||||
|
|
@ -553,7 +553,7 @@ checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 3.0.3",
|
"syn 3.0.4",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -792,7 +792,7 @@ checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 3.0.3",
|
"syn 3.0.4",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -863,9 +863,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "h2"
|
name = "h2"
|
||||||
version = "0.4.18"
|
version = "0.4.19"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "839c0e8a181239723652be9062bb56ca5bf5f64011f73b623f6f4fc59086a228"
|
checksum = "ef8e5e5a340588f4452631496976cf8636d4a7ecf600239fdc27615d2530bc16"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atomic-waker",
|
"atomic-waker",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
|
@ -1336,7 +1336,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d8f198d1db720e4940b5a493201d199d9f24f568f8f746bd13706243a2f71598"
|
checksum = "d8f198d1db720e4940b5a493201d199d9f24f568f8f746bd13706243a2f71598"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"cpufeatures 0.3.0",
|
"cpufeatures 0.3.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -1362,9 +1362,9 @@ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libredox"
|
name = "libredox"
|
||||||
version = "0.1.20"
|
version = "0.1.21"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "28d0a00925a9f930d679b6789b721e3a7f9ed110f41b86d2497caa780c3a070a"
|
checksum = "d7955dfc218a8afb29dfeffd540e3a6e96baeb94fe7138228dd7cc6937fbbf96"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"libc",
|
"libc",
|
||||||
|
|
@ -1498,7 +1498,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mtp"
|
name = "mtp"
|
||||||
version = "0.3.0"
|
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 = [
|
dependencies = [
|
||||||
"mtp-client",
|
"mtp-client",
|
||||||
"mtp-codec",
|
"mtp-codec",
|
||||||
|
|
@ -1514,7 +1514,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mtp-client"
|
name = "mtp-client"
|
||||||
version = "0.3.0"
|
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 = [
|
dependencies = [
|
||||||
"mtp-codec",
|
"mtp-codec",
|
||||||
"mtp-common",
|
"mtp-common",
|
||||||
|
|
@ -1527,7 +1527,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mtp-codec"
|
name = "mtp-codec"
|
||||||
version = "0.3.0"
|
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 = [
|
dependencies = [
|
||||||
"base64 0.23.1",
|
"base64 0.23.1",
|
||||||
"byteorder",
|
"byteorder",
|
||||||
|
|
@ -1541,10 +1541,9 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mtp-common"
|
name = "mtp-common"
|
||||||
version = "0.3.0"
|
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 = [
|
dependencies = [
|
||||||
"quinn",
|
"quinn",
|
||||||
"rustls",
|
|
||||||
"thiserror 2.0.20",
|
"thiserror 2.0.20",
|
||||||
"wtransport",
|
"wtransport",
|
||||||
]
|
]
|
||||||
|
|
@ -1552,7 +1551,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mtp-crypto"
|
name = "mtp-crypto"
|
||||||
version = "0.3.0"
|
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 = [
|
dependencies = [
|
||||||
"argon2",
|
"argon2",
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
|
|
@ -1575,7 +1574,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mtp-files"
|
name = "mtp-files"
|
||||||
version = "0.3.0"
|
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 = [
|
dependencies = [
|
||||||
"mtp-crypto",
|
"mtp-crypto",
|
||||||
"rand 0.10.2",
|
"rand 0.10.2",
|
||||||
|
|
@ -1586,7 +1585,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mtp-host"
|
name = "mtp-host"
|
||||||
version = "0.3.0"
|
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 = [
|
dependencies = [
|
||||||
"mtp-codec",
|
"mtp-codec",
|
||||||
"mtp-common",
|
"mtp-common",
|
||||||
|
|
@ -1602,7 +1601,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mtp-transport"
|
name = "mtp-transport"
|
||||||
version = "0.3.0"
|
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 = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"mtp-codec",
|
"mtp-codec",
|
||||||
|
|
@ -1622,7 +1621,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mtp-type-map"
|
name = "mtp-type-map"
|
||||||
version = "0.3.0"
|
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 = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"serde_yaml",
|
"serde_yaml",
|
||||||
|
|
@ -1631,7 +1630,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mtp-webserver"
|
name = "mtp-webserver"
|
||||||
version = "0.3.0"
|
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 = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
|
@ -1687,7 +1686,7 @@ dependencies = [
|
||||||
"num-integer",
|
"num-integer",
|
||||||
"num-iter",
|
"num-iter",
|
||||||
"num-traits",
|
"num-traits",
|
||||||
"rand 0.8.7",
|
"rand 0.8.8",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|
@ -2034,9 +2033,9 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rand"
|
name = "rand"
|
||||||
version = "0.8.7"
|
version = "0.8.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "22f6172bdec972074665ed81ed53b71da00bfc44b65a753cfde883ec4c702a1a"
|
checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"rand_chacha",
|
"rand_chacha",
|
||||||
|
|
@ -2049,7 +2048,7 @@ version = "0.10.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80"
|
checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chacha20 0.10.1",
|
"chacha20 0.10.2",
|
||||||
"getrandom 0.4.3",
|
"getrandom 0.4.3",
|
||||||
"rand_core 0.10.1",
|
"rand_core 0.10.1",
|
||||||
]
|
]
|
||||||
|
|
@ -2348,7 +2347,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 3.0.3",
|
"syn 3.0.4",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -2418,7 +2417,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4"
|
checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"cpufeatures 0.3.0",
|
"cpufeatures 0.3.1",
|
||||||
"digest 0.11.3",
|
"digest 0.11.3",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -2675,7 +2674,7 @@ dependencies = [
|
||||||
"memchr",
|
"memchr",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
"rand 0.8.7",
|
"rand 0.8.8",
|
||||||
"rsa",
|
"rsa",
|
||||||
"serde",
|
"serde",
|
||||||
"sha1",
|
"sha1",
|
||||||
|
|
@ -2713,7 +2712,7 @@ dependencies = [
|
||||||
"md-5",
|
"md-5",
|
||||||
"memchr",
|
"memchr",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"rand 0.8.7",
|
"rand 0.8.8",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"sha2 0.10.9",
|
"sha2 0.10.9",
|
||||||
|
|
@ -2785,9 +2784,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "3.0.3"
|
version = "3.0.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3"
|
checksum = "e6275cddf4610d1775e6d1fe9469b2e77d0f39fd98fb7450901b821e0c53649f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
|
@ -2842,7 +2841,7 @@ checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 3.0.3",
|
"syn 3.0.4",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -2925,7 +2924,7 @@ checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 3.0.3",
|
"syn 3.0.4",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -3077,9 +3076,9 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "uuid"
|
name = "uuid"
|
||||||
version = "1.25.0"
|
version = "1.26.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f053576934f05a761a402421fbbe3d425d9366f75f978806a037b3ca481abecc"
|
checksum = "b5772d71c9be8a8a6ac2117d949c5b224c1b72241bb611d9a3012edcf8af7812"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"getrandom 0.4.3",
|
"getrandom 0.4.3",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
|
|
@ -3576,7 +3575,7 @@ checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 3.0.3",
|
"syn 3.0.4",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@
|
||||||
bindAddress = lib.mkOption {
|
bindAddress = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "0.0.0.0";
|
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 {
|
openFirewall = lib.mkOption {
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit a297dcce60bc6e84696c6a16f5fd510beb2ca643
|
Subproject commit 486541b9483356ff49ff3ec7016f87d3ecbeaa0e
|
||||||
|
|
@ -15,7 +15,7 @@ use mtp::{
|
||||||
webserver::{MTPWebServer, WebMtpReceiver, WebMtpSender},
|
webserver::{MTPWebServer, WebMtpReceiver, WebMtpSender},
|
||||||
};
|
};
|
||||||
use std::{
|
use std::{
|
||||||
net::{IpAddr, Ipv4Addr},
|
net::IpAddr,
|
||||||
sync::{
|
sync::{
|
||||||
Arc, Mutex as StdMutex,
|
Arc, Mutex as StdMutex,
|
||||||
atomic::{AtomicU32, AtomicUsize, Ordering},
|
atomic::{AtomicU32, AtomicUsize, Ordering},
|
||||||
|
|
@ -30,11 +30,19 @@ use tokio_util::{sync::CancellationToken, task::TaskTracker};
|
||||||
|
|
||||||
const CLEANUP_INTERVAL: Duration = Duration::from_secs(30);
|
const CLEANUP_INTERVAL: Duration = Duration::from_secs(30);
|
||||||
const MAX_WAITING_AGE: Duration = Duration::from_secs(60);
|
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 ACTIVE_CONNECTIONS: AtomicUsize = AtomicUsize::new(0);
|
||||||
static NEXT_CORRELATION_ID: AtomicU32 = AtomicU32::new(1);
|
static NEXT_CORRELATION_ID: AtomicU32 = AtomicU32::new(1);
|
||||||
static ACTIVE_CONNECTIONS_BY_IP: once_cell::sync::Lazy<DashMap<IpAddr, usize>> =
|
static ACTIVE_CONNECTIONS_BY_IP: once_cell::sync::Lazy<DashMap<IpAddr, usize>> =
|
||||||
once_cell::sync::Lazy::new(DashMap::new);
|
once_cell::sync::Lazy::new(DashMap::new);
|
||||||
|
|
||||||
|
fn parse_bind_address(value: Option<&str>) -> Result<IpAddr, std::net::AddrParseError> {
|
||||||
|
value
|
||||||
|
.unwrap_or(DEFAULT_BIND_ADDRESS)
|
||||||
|
.trim()
|
||||||
|
.parse::<IpAddr>()
|
||||||
|
}
|
||||||
|
|
||||||
struct ConnectionLimitGuard(Option<IpAddr>);
|
struct ConnectionLimitGuard(Option<IpAddr>);
|
||||||
impl Drop for ConnectionLimitGuard {
|
impl Drop for ConnectionLimitGuard {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
|
|
@ -666,7 +674,7 @@ pub async fn start(port: u16, state: Arc<OmegaState>) -> Result<(), Box<dyn std:
|
||||||
let web_config = server::web::build_web_config(state.identity.clone())?
|
let web_config = server::web::build_web_config(state.identity.clone())?
|
||||||
.serve_tcp_https(true)
|
.serve_tcp_https(true)
|
||||||
.max_tcp_connections(256);
|
.max_tcp_connections(256);
|
||||||
let ip = IpAddr::from(Ipv4Addr::new(0, 0, 0, 0));
|
let ip = parse_bind_address(std::env::var("BIND_ADDRESS").ok().as_deref())?;
|
||||||
let host_config = HostConfig::new(ip, port, cert_pem, key_pem)
|
let host_config = HostConfig::new(ip, port, cert_pem, key_pem)
|
||||||
.with_policy(Policy {
|
.with_policy(Policy {
|
||||||
send_mode: SendMode::SingleStreamPerMessage,
|
send_mode: SendMode::SingleStreamPerMessage,
|
||||||
|
|
|
||||||
|
|
@ -273,7 +273,7 @@ fn format_data_container(data: Vec<(DataTypeId, DataValue)>, version: Version) -
|
||||||
let key_str = key.to_string();
|
let key_str = key.to_string();
|
||||||
|
|
||||||
match value {
|
match value {
|
||||||
DataValue::Str(s) => format!("{}=\"{}\"", key_str, s),
|
DataValue::Str(s) => format!("{}=\"{}\"", key_str, abbreviate_string(&s)),
|
||||||
|
|
||||||
DataValue::Container(inner) => {
|
DataValue::Container(inner) => {
|
||||||
let inner_formatted = format_data_container(inner, version.clone());
|
let inner_formatted = format_data_container(inner, version.clone());
|
||||||
|
|
@ -304,7 +304,7 @@ fn format_array(arr: Vec<DataValue>, version: Version) -> String {
|
||||||
let parts: Vec<String> = arr
|
let parts: Vec<String> = arr
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|value| match value {
|
.map(|value| match value {
|
||||||
DataValue::Str(s) => format!("\"{}\"", s),
|
DataValue::Str(s) => format!("\"{}\"", abbreviate_string(&s)),
|
||||||
|
|
||||||
DataValue::Container(inner) => {
|
DataValue::Container(inner) => {
|
||||||
let inner_formatted = format_data_container(inner, version.clone());
|
let inner_formatted = format_data_container(inner, version.clone());
|
||||||
|
|
@ -329,6 +329,32 @@ fn format_array(arr: Vec<DataValue>, version: Version) -> String {
|
||||||
|
|
||||||
parts.join(", ")
|
parts.join(", ")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn abbreviate_string(value: &str) -> String {
|
||||||
|
const EDGE_LENGTH: usize = 4;
|
||||||
|
|
||||||
|
let chars: Vec<char> = 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_export]
|
||||||
macro_rules! log_cv {
|
macro_rules! log_cv {
|
||||||
($kind:expr, $cv:expr) => {
|
($kind:expr, $cv:expr) => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue