Skip to content

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

Fix existing CI errors in Rust (#8585)

James Brunton287993235084
diff --git a/frontend/src-tauri/Cargo.lock b/frontend/src-tauri/Cargo.lock
index cf58623d6f..de04c1e6c6 100644
--- a/frontend/src-tauri/Cargo.lock
+++ b/frontend/src-tauri/Cargo.lock
@@ -4026,9 +4026,9 @@ dependencies = [
[[package]]
name = "rustls"
-version = "0.23.37"
+version = "0.23.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4"
+checksum = "0d41d731c7d2f962d1ccc364cec258de3c0e93b38c2fb3ba97ac74513048d634"
dependencies = [
"once_cell",
"ring",
@@ -4089,9 +4089,9 @@ checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f"
[[package]]
name = "rustls-webpki"
-version = "0.103.13"
+version = "0.103.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e"
+checksum = "4443b1b6d39d7c663139942cc4558262562d2c84123bb6282ef177009ca8b281"
dependencies = [
"ring",
"rustls-pki-types",
diff --git a/frontend/src-tauri/src/commands/auth.rs b/frontend/src-tauri/src/commands/auth.rs
index 6734ba6025..f170f64fcf 100644
--- a/frontend/src-tauri/src/commands/auth.rs
+++ b/frontend/src-tauri/src/commands/auth.rs
@@ -426,14 +426,11 @@ pub async fn login(
// Detect if this is Supabase (SaaS) or Spring Boot (self-hosted)
let is_supabase = server_url.trim_end_matches('/') == saas_server_url.trim_end_matches('/');
- // Create HTTP client with certificate bypass
- // This handles:
- // - Self-signed certificates
- // - Missing intermediate certificates
- // - Certificate hostname mismatches
+ // Only self-hosted servers skip certificate validation, since they often have
+ // self-signed certificates, missing intermediates or hostname mismatches.
// Note: Rustls only supports TLS 1.2 and TLS 1.3
let client = reqwest::Client::builder()
- .danger_accept_invalid_certs(true)
+ .danger_accept_invalid_certs(!is_supabase)
.timeout(std::time::Duration::from_secs(30))
.user_agent("StirlingPDF-Desktop/1.0 Tauri")
.build()
@@ -612,7 +609,7 @@ pub async fn login(
.await
.map_err(|e| format!("Failed to parse Spring Boot response: {}", e))?;
- log::info!("Spring Boot login successful for user: {}", login_response.user.username);
+ log::info!("Spring Boot login successful");
Ok(LoginResponse {
token: login_response.session.access_token,
@@ -782,14 +779,8 @@ async fn exchange_code_for_token(
) -> Result<OAuthCallbackResult, String> {
log::info!("Exchanging authorization code for access token with PKCE");
- // Create HTTP client with certificate bypass
- // This handles:
- // - Self-signed certificates
- // - Missing intermediate certificates
- // - Certificate hostname mismatches
// Note: Rustls only supports TLS 1.2 and TLS 1.3
let client = reqwest::Client::builder()
- .danger_accept_invalid_certs(true)
.timeout(std::time::Duration::from_secs(30))
.user_agent("StirlingPDF-Desktop/1.0 Tauri")
.build()