Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 18 additions & 12 deletions Cargo.lock

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

3 changes: 0 additions & 3 deletions crates/defguard_core/src/db/models/enrollment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ pub enum TokenError {
AdminNotFound,
#[error("User account is already activated")]
AlreadyActive,
#[error("Failed to send enrollment notification: {0}")]
NotificationError(String),
#[error("Enrollment welcome message not configured")]
WelcomeMsgNotConfigured,
#[error("Enrollment welcome email not configured")]
Expand All @@ -60,7 +58,6 @@ impl From<TokenError> for Status {
| TokenError::AdminNotFound
| TokenError::UserNotFound
| TokenError::UserDisabled
| TokenError::NotificationError(_)
| TokenError::WelcomeMsgNotConfigured
| TokenError::WelcomeEmailNotConfigured
| TokenError::TemplateError(_)
Expand Down
1 change: 0 additions & 1 deletion crates/defguard_core/src/enrollment_management.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ pub async fn start_user_enrollment(
}
Err(err) => {
error!("Error sending mail: {err}");
return Err(TokenError::NotificationError(err.to_string()));
}
}
}
Expand Down
9 changes: 4 additions & 5 deletions crates/defguard_core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ pub enum WebError {
Grpc(String),
#[error("Webauthn registration error: {0}")]
WebauthnRegistration(String),
#[error("Email MFA error: {0}")]
EmailMfa(String),
#[error("Email error: {0}")]
Email(String),
#[error("Object not found: {0}")]
ObjectNotFound(String),
#[error("Object already exists: {0}")]
Expand Down Expand Up @@ -165,8 +165,7 @@ impl From<TokenError> for WebError {
| TokenError::TokenUsed
| TokenError::UserDisabled => WebError::Authorization(err.to_string()),
TokenError::AlreadyActive => WebError::BadRequest(err.to_string()),
TokenError::NotificationError(_)
| TokenError::WelcomeMsgNotConfigured
TokenError::WelcomeMsgNotConfigured
| TokenError::WelcomeEmailNotConfigured
| TokenError::TemplateError(_)
| TokenError::UrlParseError(_)
Expand Down Expand Up @@ -211,7 +210,7 @@ impl From<UserError> for WebError {
UserError::InvalidMfaState { username: _ } | UserError::DbError(_) => {
WebError::Http(StatusCode::INTERNAL_SERVER_ERROR)
}
UserError::EmailMfaError(msg) => WebError::EmailMfa(msg),
UserError::EmailMfaError(msg) => WebError::Email(msg),
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions crates/defguard_core/src/grpc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,12 @@ impl InstanceInfo {
.map(|provider| provider.display_name.clone())
.unwrap_or_default();
let url = Settings::url()?;
let proxy_url = settings.proxy_public_url()?;
Ok(Self {
id: settings.uuid,
name: settings.instance_name.clone(),
name: settings.instance_name,
url,
proxy_url: settings.proxy_public_url()?,
proxy_url,
username: username.into(),
client_traffic_policy: enterprise_settings.client_traffic_policy,
enterprise_enabled: is_business_license_active(),
Expand Down
2 changes: 1 addition & 1 deletion crates/defguard_core/src/handlers/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ pub async fn email_mfa_init(session: SessionInfo, State(appstate): State<AppStat
let settings = Settings::get_current_settings();
if !settings.smtp_configured() {
error!("Unable to start email MFA configuration. SMTP is not configured.");
return Err(WebError::EmailMfa("SMTP not configured".into()));
return Err(WebError::Email("SMTP not configured".into()));
}

// generate TOTP secret
Expand Down
2 changes: 1 addition & 1 deletion crates/defguard_core/src/handlers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl From<WebError> for ApiResponse {
| WebError::WebauthnRegistration(_)
| WebError::Serialization(_)
| WebError::ModelError(_)
| WebError::EmailMfa(_)
| WebError::Email(_)
| WebError::ClientIpError
| WebError::FirewallError(_)
| WebError::ApiEventChannelError(_)
Expand Down
12 changes: 6 additions & 6 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
"@stablelib/base64": "^2.0.1",
"@stablelib/x25519": "^2.0.1",
"@tanstack/react-form": "^1.29.0",
"@tanstack/react-query": "^5.99.0",
"@tanstack/react-router": "^1.168.22",
"@tanstack/react-query": "^5.99.2",
"@tanstack/react-router": "^1.168.23",
"@tanstack/react-table": "^8.21.3",
"@tanstack/react-virtual": "^3.13.23",
"@tanstack/react-virtual": "^3.13.24",
"@uidotdev/usehooks": "^2.4.1",
"axios": "^1.15.0",
"axios": "^1.15.1",
"byte-size": "^9.0.1",
"clsx": "^2.1.1",
"dayjs": "^1.11.20",
Expand Down Expand Up @@ -58,7 +58,7 @@
"@inlang/paraglide-js": "2.16.0",
"@tanstack/devtools-vite": "^0.6.0",
"@tanstack/react-devtools": "^0.10.2",
"@tanstack/react-query-devtools": "^5.99.0",
"@tanstack/react-query-devtools": "^5.99.2",
"@tanstack/react-router-devtools": "^1.166.13",
"@tanstack/router-plugin": "^1.167.22",
"@types/byte-size": "^8.1.2",
Expand All @@ -79,7 +79,7 @@
"stylelint-config-standard-scss": "^17.0.0",
"stylelint-scss": "^7.0.0",
"typescript": "~5.9.3",
"vite": "^8.0.8",
"vite": "^8.0.9",
"vite-plugin-image-optimizer": "^2.0.3",
"vitest": "^4.1.4"
}
Expand Down
Loading
Loading