Skip to content

Commit

Permalink
refactor: stream directly to drive, whitelist URLs, sanitize things p…
Browse files Browse the repository at this point in the history
…roperly
  • Loading branch information
vgskye committed May 19, 2024
1 parent ac1a6ce commit 2a25644
Show file tree
Hide file tree
Showing 5 changed files with 331 additions and 146 deletions.
16 changes: 7 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

164 changes: 117 additions & 47 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ tauri-build = { version = "1.3.0", features = [] }
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.3.0", features = [ "shell-open", "dialog-confirm", "http-api", "window-close"] }
zip = "0.6.6"
zip = { version = "1.3.0", default-features = false, features = ["aes-crypto", "deflate", "deflate64", "lzma", "bzip2", "zstd", "time"] }
tokio = { version = "1", features = [ "fs" ] }
sha2 = "0.10.6"
sha2 = "0.10.8"
hex = "0.4.3"
time = { version = "0.3.15", features = [ "formatting" ] }
time = { version = "0.3.36", features = [ "formatting" ] }
anyhow = "1.0.71"
reqwest = "0.11.24"

[features]
# by default Tauri runs in production mode
Expand Down
8 changes: 8 additions & 0 deletions src-tauri/src/config.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
pub const DOWNLOADS_DOMAIN_WHITELIST: &[&str] = &[
"cdn.modrinth.com",
"github.com",
"raw.githubusercontent.com",
"gitlab.com",
];

pub const PACK_DOMAIN_WHITELIST: &[&str] = &["cdn.modrinth.com"];
Loading

0 comments on commit 2a25644

Please sign in to comment.