mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-09 18:59:36 +00:00
chore(deps): refresh package versions
This commit is contained in:
@@ -470,6 +470,7 @@ mod tests {
|
||||
axum::serve(listener, app).await.unwrap();
|
||||
});
|
||||
|
||||
crate::ensure_reqwest_crypto_provider();
|
||||
let response = reqwest::get(format!("http://{address}/ping"))
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
@@ -278,12 +278,11 @@ pub struct PersistedSettings {
|
||||
pub prevents_sleep_while_downloading: bool,
|
||||
pub media_cookie_source: MediaCookieSource,
|
||||
pub site_logins: Vec<SiteLogin>,
|
||||
/// HMAC shared secret for the browser extension. It is persisted in the
|
||||
/// settings database so that startup never needs to touch the OS keychain.
|
||||
/// The keychain is still used as defence-in-depth — grant_keychain_access
|
||||
/// writes the token there — but the DB copy is the primary read path,
|
||||
/// eliminating the OS credential prompt that macOS shows when the binary
|
||||
/// signature changes after an update.
|
||||
// HMAC shared secret for the browser extension. It is persisted in the
|
||||
// settings database so startup never needs to touch the OS keychain.
|
||||
// The keychain is still used as defense-in-depth by grant_keychain_access,
|
||||
// but the DB copy is the primary read path, eliminating the OS credential
|
||||
// prompt that macOS shows when the binary signature changes after an update.
|
||||
#[serde(default)]
|
||||
pub extension_pairing_token: String,
|
||||
pub auto_check_updates: bool,
|
||||
|
||||
@@ -12,6 +12,13 @@ use tauri::{Emitter, Manager};
|
||||
use tauri_plugin_deep_link::DeepLinkExt;
|
||||
use ts_rs::TS;
|
||||
|
||||
pub(crate) fn ensure_reqwest_crypto_provider() {
|
||||
static INSTALL: OnceLock<()> = OnceLock::new();
|
||||
INSTALL.get_or_init(|| {
|
||||
let _ = rustls::crypto::ring::default_provider().install_default();
|
||||
});
|
||||
}
|
||||
|
||||
fn sanitize_metadata_filename(filename: &str) -> Option<String> {
|
||||
let normalized = filename.trim().replace('\\', "/");
|
||||
let basename = std::path::Path::new(&normalized)
|
||||
@@ -1195,6 +1202,8 @@ async fn fetch_metadata(
|
||||
cookies: Option<String>,
|
||||
proxy: Option<String>,
|
||||
) -> Result<MetadataResponse, String> {
|
||||
ensure_reqwest_crypto_provider();
|
||||
|
||||
let mut current_url = url.clone();
|
||||
let original_host = reqwest::Url::parse(&url).ok().and_then(|u| u.host_str().map(|s| s.to_string()));
|
||||
let mut redirects = 0;
|
||||
@@ -2120,6 +2129,8 @@ pub(crate) async fn rpc_call(
|
||||
method: &str,
|
||||
params: serde_json::Value,
|
||||
) -> Result<serde_json::Value, String> {
|
||||
ensure_reqwest_crypto_provider();
|
||||
|
||||
let url = format!("http://127.0.0.1:{}/jsonrpc", port);
|
||||
let mut payload = serde_json::Map::new();
|
||||
payload.insert("jsonrpc".to_string(), serde_json::json!("2.0"));
|
||||
@@ -5266,6 +5277,8 @@ fn is_log_paused() -> bool {
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
ensure_reqwest_crypto_provider();
|
||||
|
||||
let extension_pairing_token = Arc::new(RwLock::new(String::new()));
|
||||
let server_pairing_token = extension_pairing_token.clone();
|
||||
let extension_frontend_ready = Arc::new(AtomicBool::new(false));
|
||||
|
||||
@@ -541,6 +541,7 @@ pub async fn check_for_updates(
|
||||
) -> Result<ReleaseCheckOutcome, String> {
|
||||
let current_version = app_handle.package_info().version.to_string();
|
||||
|
||||
crate::ensure_reqwest_crypto_provider();
|
||||
let client = reqwest::Client::new();
|
||||
let res = client
|
||||
.get("https://api.github.com/repos/nimbold/Firelink/releases?per_page=30")
|
||||
|
||||
@@ -1010,6 +1010,8 @@ async fn probe_bounded_range_support(
|
||||
uri: &str,
|
||||
payload: &SpawnPayload,
|
||||
) -> Result<BoundedRangeSupport, String> {
|
||||
crate::ensure_reqwest_crypto_provider();
|
||||
|
||||
let mut builder = reqwest::Client::builder()
|
||||
.redirect(reqwest::redirect::Policy::limited(5))
|
||||
.timeout(std::time::Duration::from_secs(10));
|
||||
|
||||
Reference in New Issue
Block a user