Skip to content

Validate location address#2388

Merged
moubctez merged 12 commits into
devfrom
validate_location_address
Mar 18, 2026
Merged

Validate location address#2388
moubctez merged 12 commits into
devfrom
validate_location_address

Conversation

@moubctez
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements stricter validation for WireGuard location “gateway IP” addresses so that network/broadcast addresses (e.g. 192.168.44.0/29) are rejected, and refactors WireguardNetwork address handling to centralize validation.

Changes:

  • Introduces WireguardNetwork::set_address(...) validation and makes WireguardNetwork.address private with an address() accessor.
  • Updates core/setup/managers/tests to use the new address API (set_address / address()), and adjusts test data away from network addresses.
  • Standardizes many DB helpers to return sqlx::Result and moves some device→network lookup helpers onto WireguardNetwork.

Reviewed changes

Copilot reviewed 68 out of 69 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
crates/defguard_static_ip/src/lib.rs Updates tests to use new address builder/accessor APIs.
crates/defguard_setup/tests/wizard_state.rs Adjusts seeded WireGuard location creation to new address API.
crates/defguard_setup/tests/auto_adoption_wizard.rs Updates auto-adoption test seeding for new WireguardNetwork APIs.
crates/defguard_setup/src/handlers/auto_wizard.rs Uses set_address when applying VPN settings in wizard handler.
crates/defguard_setup/src/auto_adoption.rs Refactors network creation to set_address; minor pattern cleanup.
crates/defguard_session_manager/tests/common/mod.rs Updates location/device setup to use set_address and new helper.
crates/defguard_proxy_manager/src/servers/enrollment.rs Uses WireguardNetwork::find_network_device_networks instead of Device method.
crates/defguard_gateway_manager/src/handler.rs Switches to address() accessor when generating gateway config updates.
crates/defguard_core/tests/integration/api/wireguard_network_import.rs Updates import tests for new address validation + accessor.
crates/defguard_core/tests/integration/api/wireguard_network_devices.rs Uses new WireguardNetwork::find_network_device_networks helper.
crates/defguard_core/tests/integration/api/wireguard.rs Updates integration tests to avoid network-address inputs.
crates/defguard_core/tests/integration/api/acl/rules.rs Updates WireGuard network construction call sites for new signature.
crates/defguard_core/tests/integration/api/acl/mod.rs Cleans imports after WireguardNetwork::new signature change.
crates/defguard_core/src/wg_config.rs Uses set_address, sets mtu/fwmark post-construction, updates tests.
crates/defguard_core/src/location_management/tests.rs Refactors test network address updates to use set_address.
crates/defguard_core/src/location_management/mod.rs Uses address() accessor; refactors tests to new builder API.
crates/defguard_core/src/location_management/allowed_peers.rs Simplifies sqlx result types and updates test setup to new address API.
crates/defguard_core/src/lib.rs Refactors dev-env and init_vpn_location to use set_address.
crates/defguard_core/src/handlers/wireguard.rs Uses try_set_address / set_address on create/modify paths.
crates/defguard_core/src/handlers/user.rs Switches to sqlx::Result signatures.
crates/defguard_core/src/handlers/ssh_authorized_keys.rs Switches to sqlx::Result signatures.
crates/defguard_core/src/handlers/network_devices.rs Uses new WireguardNetwork::find_network_device_networks and address() accessor.
crates/defguard_core/src/handlers/mod.rs Maps IpNetworkError into 400 responses via WebError::IpNetwork.
crates/defguard_core/src/error.rs Adds WebError::IpNetwork for ipnetwork::IpNetworkError.
crates/defguard_core/src/enterprise/limits.rs Switches to sqlx::Result signatures.
crates/defguard_core/src/enterprise/license.rs Normalizes DB error typing to sqlx::Error.
crates/defguard_core/src/enterprise/ldap/model.rs Switches to sqlx::Result signatures; minor formatting.
crates/defguard_core/src/enterprise/ldap/error.rs Normalizes DB error typing to sqlx::Error.
crates/defguard_core/src/enterprise/firewall/tests/unapplied_rules.rs Updates test locations to use set_address.
crates/defguard_core/src/enterprise/firewall/tests/mod.rs Uses address() accessor and updates location setup to new API.
crates/defguard_core/src/enterprise/firewall/tests/gh1868.rs Updates test locations to use set_address and address().
crates/defguard_core/src/enterprise/firewall/tests/expired_rules.rs Updates test locations to use set_address where needed.
crates/defguard_core/src/enterprise/firewall/tests/disabled_rules.rs Updates test locations to use set_address.
crates/defguard_core/src/enterprise/firewall/tests/destination.rs Updates test locations to use set_address.
crates/defguard_core/src/enterprise/firewall/tests/all_locations.rs Updates test locations to use set_address.
crates/defguard_core/src/enterprise/firewall/mod.rs Uses address() accessor; normalizes sqlx::Result return types.
crates/defguard_core/src/enterprise/directory_sync/tests.rs Updates location creation to use set_address.
crates/defguard_core/src/enterprise/directory_sync/mod.rs Normalizes DB error typing to sqlx::Error.
crates/defguard_core/src/enterprise/db/models/openid_provider.rs Switches to sqlx::Result signatures.
crates/defguard_core/src/enterprise/db/models/api_tokens.rs Switches to sqlx::Result signatures.
crates/defguard_core/src/enterprise/db/models/activity_log_stream.rs Switches to sqlx::Result signatures.
crates/defguard_core/src/enterprise/db/models/acl/tests.rs Updates imports and network creation to match new WireGuard API.
crates/defguard_core/src/enterprise/db/models/acl.rs Normalizes DB error typing; uses WireguardNetwork::all_for_rule.
crates/defguard_core/src/db/models/webhook.rs Switches to sqlx::Result signatures.
crates/defguard_core/src/db/models/enrollment.rs Normalizes DB error typing to sqlx::Error.
crates/defguard_common/src/types/user_info.rs Switches to sqlx::Result signatures.
crates/defguard_common/src/db/models/wireguard/tests.rs Adds unit/integration test coverage for address validation behavior.
crates/defguard_common/src/db/models/wireguard.rs Core refactor: private address, address() accessor, set_address validation, new constructor signature, new helper queries.
crates/defguard_common/src/db/models/webauthn.rs Switches to sqlx::Result signatures.
crates/defguard_common/src/db/models/vpn_session_stats.rs Switches to sqlx::Result signatures.
crates/defguard_common/src/db/models/vpn_client_session.rs Switches to sqlx::Result signatures.
crates/defguard_common/src/db/models/user.rs Normalizes DB error typing and switches to sqlx::Result signatures.
crates/defguard_common/src/db/models/setup_auto_adoption.rs Switches to sqlx::Result signatures.
crates/defguard_common/src/db/models/session.rs Switches to sqlx::Result signatures.
crates/defguard_common/src/db/models/polling_token.rs Switches to sqlx::Result signatures.
crates/defguard_common/src/db/models/oauth2token.rs Switches to sqlx::Result signatures.
crates/defguard_common/src/db/models/oauth2client.rs Switches to sqlx::Result signatures.
crates/defguard_common/src/db/models/oauth2authorizedapp.rs Switches to sqlx::Result signatures.
crates/defguard_common/src/db/models/migration_wizard.rs Switches to sqlx::Result signatures.
crates/defguard_common/src/db/models/mfa_info.rs Switches to sqlx::Result signatures.
crates/defguard_common/src/db/models/initial_setup_wizard.rs Switches to sqlx::Result signatures.
crates/defguard_common/src/db/models/group.rs Switches to sqlx::Result signatures.
crates/defguard_common/src/db/models/gateway.rs Switches to sqlx::Result signatures.
crates/defguard_common/src/db/models/device_login.rs Switches to sqlx::Result signatures.
crates/defguard_common/src/db/models/device.rs Switches to sqlx::Result; replaces device method with WireguardNetwork helper usage.
crates/defguard_common/src/db/models/biometric_auth.rs Switches to sqlx::Result signatures.
crates/defguard_common/src/db/models/authentication_key.rs Switches to sqlx::Result signatures.
crates/defguard_common/src/db/models/auth_code.rs Switches to sqlx::Result signatures.
.sqlx/query-c58c7b4dc7463a93895b17d591e3e4a83ac3623590674e47bb1a1dbf9c25d77f.json Removes obsolete sqlx prepared query metadata.
Files not reviewed (1)
  • .sqlx/query-c58c7b4dc7463a93895b17d591e3e4a83ac3623590674e47bb1a1dbf9c25d77f.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/defguard_common/src/db/models/wireguard.rs Outdated
Comment thread crates/defguard_core/src/handlers/wireguard.rs
Comment thread crates/defguard_common/src/db/models/wireguard.rs
Comment thread crates/defguard_common/src/db/models/wireguard/tests.rs
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses DefGuard issue #2266 by validating WireGuard location (gateway) interface addresses so users can’t set a network (or broadcast) address as the gateway IP. It does this by making WireguardNetwork.address private and funnelling all updates through validated setters, then updates call sites/tests accordingly.

Changes:

  • Add validated address() getter plus set_address(...) / try_set_address(...) setters on WireguardNetwork, rejecting network/broadcast addresses.
  • Update core/setup/gateway/proxy code paths and many tests to use the new APIs (and to avoid using network addresses like 10.0.0.0/24).
  • Add API error plumbing for IpNetworkError and introduce focused unit tests for address validation.

Reviewed changes

Copilot reviewed 69 out of 71 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
crates/defguard_static_ip/src/lib.rs Update tests to construct locations via validated address setters/getter.
crates/defguard_setup/tests/wizard_state.rs Seed WireGuard network using set_address (validated) and set MTU explicitly.
crates/defguard_setup/tests/auto_adoption_wizard.rs Align seeding helper with new WireguardNetwork API and Id import.
crates/defguard_setup/src/handlers/auto_wizard.rs Apply validated set_address when wizard updates VPN gateway address.
crates/defguard_setup/src/auto_adoption.rs Use set_address for auto-adopted networks and simplify option destructuring.
crates/defguard_session_manager/tests/common/mod.rs Use validated address + update helper queries and fix “WireGuard” spelling.
crates/defguard_proxy_manager/src/servers/enrollment.rs Switch to WireguardNetwork::find_network_device_networks helper.
crates/defguard_gateway_manager/src/handler.rs Use address() getter when generating gateway configuration updates.
crates/defguard_core/tests/integration/grpc/gateway.rs Update test network construction to new WireguardNetwork::new signature.
crates/defguard_core/tests/integration/api/wireguard_network_import.rs Seed initial network with validated gateway address and use address().
crates/defguard_core/tests/integration/api/wireguard_network_devices.rs Use WireguardNetwork::find_network_device_networks in assertions.
crates/defguard_core/tests/integration/api/wireguard.rs Update test payloads to use host gateway addresses instead of network addresses.
crates/defguard_core/tests/integration/api/acl/rules.rs Adjust network construction to updated WireguardNetwork::new signature.
crates/defguard_core/tests/integration/api/acl/mod.rs Remove unused WireGuard default constants from imports after API change.
crates/defguard_core/src/wg_config.rs Parse imported configs into validated WireguardNetwork via set_address.
crates/defguard_core/src/location_management/tests.rs Use set_address for test network creation and modification.
crates/defguard_core/src/location_management/mod.rs Use address() getter and update tests to chain try_set_address.
crates/defguard_core/src/location_management/allowed_peers.rs Use sqlx::Result and updated network construction with validated addresses.
crates/defguard_core/src/lib.rs Seed/init VPN locations using set_address instead of direct field assignment.
crates/defguard_core/src/handlers/wireguard.rs Enforce validated address setting on create/modify paths via setters.
crates/defguard_core/src/handlers/user.rs Normalize to sqlx::Result in user detail fetch logic.
crates/defguard_core/src/handlers/ssh_authorized_keys.rs Normalize to sqlx::Result for DB access helpers.
crates/defguard_core/src/handlers/network_devices.rs Use WireguardNetwork::find_network_device_networks and address() getter.
crates/defguard_core/src/handlers/mod.rs Map WebError::IpNetwork into 400 responses with message passthrough.
crates/defguard_core/src/error.rs Add WebError::IpNetwork variant for propagating IpNetworkError.
crates/defguard_core/src/enterprise/limits.rs Normalize DB helper signatures to sqlx::Result.
crates/defguard_core/src/enterprise/license.rs Switch error type aliasing to sqlx::Error.
crates/defguard_core/src/enterprise/ldap/model.rs Normalize DB return types to sqlx::Result and minor formatting.
crates/defguard_core/src/enterprise/ldap/error.rs Use sqlx::Error directly in LDAP error enum.
crates/defguard_core/src/enterprise/firewall/tests/unapplied_rules.rs Seed locations with valid host addresses for ACL firewall tests.
crates/defguard_core/src/enterprise/firewall/tests/mod.rs Update test helpers to use address() and valid host gateway addresses.
crates/defguard_core/src/enterprise/firewall/tests/gh1868.rs Seed ACL-enabled locations via set_address and use address() getter.
crates/defguard_core/src/enterprise/firewall/tests/expired_rules.rs Update test locations to use validated address setters.
crates/defguard_core/src/enterprise/firewall/tests/disabled_rules.rs Update test locations to use validated address setters.
crates/defguard_core/src/enterprise/firewall/tests/destination.rs Update test location seeding with validated host gateway addresses.
crates/defguard_core/src/enterprise/firewall/tests/all_locations.rs Update location seeding with set_address in all-locations ACL tests.
crates/defguard_core/src/enterprise/firewall/mod.rs Use address() getter and normalize DB return types to sqlx::Result.
crates/defguard_core/src/enterprise/directory_sync/tests.rs Seed WireGuard network via set_address under new constructor signature.
crates/defguard_core/src/enterprise/directory_sync/mod.rs Switch directory sync DB error type to sqlx::Error.
crates/defguard_core/src/enterprise/db/models/openid_provider.rs Normalize DB functions to sqlx::Result and drop SqlxError alias.
crates/defguard_core/src/enterprise/db/models/api_tokens.rs Normalize DB helpers to sqlx::Result.
crates/defguard_core/src/enterprise/db/models/activity_log_stream.rs Normalize DB helpers to sqlx::Result.
crates/defguard_core/src/enterprise/db/models/acl/tests.rs Update test imports and WireGuard network construction for new API.
crates/defguard_core/src/enterprise/db/models/acl.rs Replace inline network query with WireguardNetwork::all_for_rule and normalize errors.
crates/defguard_core/src/db/models/webhook.rs Normalize DB helpers to sqlx::Result.
crates/defguard_core/src/db/models/enrollment.rs Normalize enrollment token DB error typing to sqlx::Error.
crates/defguard_common/src/types/user_info.rs Normalize return types to sqlx::Result.
crates/defguard_common/src/db/models/wireguard/tests.rs Add unit/integration tests for rejecting network/broadcast gateway addresses.
crates/defguard_common/src/db/models/wireguard.rs Make address private; add validated getters/setters; add query helpers; normalize error types.
crates/defguard_common/src/db/models/webauthn.rs Normalize DB helpers to sqlx::Result.
crates/defguard_common/src/db/models/vpn_session_stats.rs Normalize DB helpers to sqlx::Result.
crates/defguard_common/src/db/models/vpn_client_session.rs Normalize DB helpers to sqlx::Result.
crates/defguard_common/src/db/models/user.rs Normalize DB helpers to sqlx::Result and remove SqlxError aliasing.
crates/defguard_common/src/db/models/setup_auto_adoption.rs Normalize DB helpers to sqlx::Result.
crates/defguard_common/src/db/models/session.rs Normalize DB helpers to sqlx::Result.
crates/defguard_common/src/db/models/polling_token.rs Normalize DB helpers to sqlx::Result.
crates/defguard_common/src/db/models/oauth2token.rs Normalize DB helpers to sqlx::Result.
crates/defguard_common/src/db/models/oauth2client.rs Normalize DB helpers to sqlx::Result.
crates/defguard_common/src/db/models/oauth2authorizedapp.rs Normalize DB helpers to sqlx::Result.
crates/defguard_common/src/db/models/migration_wizard.rs Normalize DB helpers to sqlx::Result.
crates/defguard_common/src/db/models/mfa_info.rs Normalize DB helpers to sqlx::Result.
crates/defguard_common/src/db/models/initial_setup_wizard.rs Normalize DB helpers to sqlx::Result.
crates/defguard_common/src/db/models/group.rs Normalize DB helpers to sqlx::Result.
crates/defguard_common/src/db/models/gateway.rs Normalize DB helpers to sqlx::Result.
crates/defguard_common/src/db/models/device_login.rs Normalize DB helpers to sqlx::Result.
crates/defguard_common/src/db/models/device.rs Move “network device networks” query to WireguardNetwork; normalize DB helpers; use address() getter.
crates/defguard_common/src/db/models/biometric_auth.rs Normalize DB helpers to sqlx::Result.
crates/defguard_common/src/db/models/authentication_key.rs Normalize DB helpers to sqlx::Result.
crates/defguard_common/src/db/models/auth_code.rs Normalize DB helpers to sqlx::Result.
Cargo.lock Bump transitive TOML/winnow dependencies via lockfile update.
.sqlx/query-c58c7b4dc7463a93895b17d591e3e4a83ac3623590674e47bb1a1dbf9c25d77f.json Remove stale sqlx offline query metadata after query refactor.
Files not reviewed (1)
  • .sqlx/query-c58c7b4dc7463a93895b17d591e3e4a83ac3623590674e47bb1a1dbf9c25d77f.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread crates/defguard_common/src/db/models/wireguard.rs
Comment thread crates/defguard_core/src/enterprise/firewall/tests/all_locations.rs
Comment thread crates/defguard_common/src/db/models/wireguard.rs Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses DefGuard issue #2266 by ensuring WireGuard “location” (gateway) addresses cannot be set to a subnet’s network or broadcast address, and refactors the WireguardNetwork model API to enforce validated address updates across the codebase.

Changes:

  • Make WireguardNetwork.address private and route updates through set_address/try_set_address with network/broadcast validation.
  • Update handlers, services, and tests to use the new address API and new helper queries (e.g., WireguardNetwork::find_network_device_networks).
  • Standardize many DB-returning APIs to use sqlx::Result and adjust SQLx metadata/artifacts accordingly.

Reviewed changes

Copilot reviewed 69 out of 71 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
crates/defguard_static_ip/src/lib.rs Update tests to use validated try_set_address and address() accessor.
crates/defguard_setup/tests/wizard_state.rs Seed locations via set_address (validated) instead of passing raw network CIDRs.
crates/defguard_setup/tests/auto_adoption_wizard.rs Align test seeding with new WireguardNetwork API and Id import.
crates/defguard_setup/src/handlers/auto_wizard.rs Use set_address for VPN wizard settings to enforce validation.
crates/defguard_setup/src/auto_adoption.rs Use set_address when creating auto-adopted networks; minor refactors.
crates/defguard_session_manager/tests/common/mod.rs Fix test location address to a host IP and update helper calls.
crates/defguard_proxy_manager/src/servers/enrollment.rs Switch to WireguardNetwork::find_network_device_networks helper.
crates/defguard_gateway_manager/src/handler.rs Use address() getter when generating gateway configuration payloads.
crates/defguard_core/tests/integration/grpc/gateway.rs Adjust network creation calls to updated WireguardNetwork::new signature.
crates/defguard_core/tests/integration/api/wireguard_network_import.rs Update import tests to set validated host addresses and use address().
crates/defguard_core/tests/integration/api/wireguard_network_devices.rs Use new WireguardNetwork::find_network_device_networks helper in assertions.
crates/defguard_core/tests/integration/api/wireguard.rs Update test payload addresses away from network addresses.
crates/defguard_core/tests/integration/api/acl/rules.rs Update network creation calls to new WireguardNetwork::new signature.
crates/defguard_core/tests/integration/api/acl/mod.rs Remove unused default constants from imports after API changes.
crates/defguard_core/src/wg_config.rs Parse config into a network and apply validated set_address; adjust tests.
crates/defguard_core/src/location_management/tests.rs Use set_address instead of direct address mutation in tests.
crates/defguard_core/src/location_management/mod.rs Use address() accessor and update test setup to chained builders.
crates/defguard_core/src/location_management/allowed_peers.rs Convert to sqlx::Result and update test setup for validated addresses.
crates/defguard_core/src/lib.rs Use validated address setting in dev init and VPN location init code paths.
crates/defguard_core/src/handlers/wireguard.rs Enforce validated address setting in create/modify network handlers.
crates/defguard_core/src/handlers/user.rs Simplify DB error typing to sqlx::Result.
crates/defguard_core/src/handlers/ssh_authorized_keys.rs Simplify DB error typing to sqlx::Result.
crates/defguard_core/src/handlers/network_devices.rs Use new network lookup helper and address() accessor consistently.
crates/defguard_core/src/handlers/mod.rs Map IpNetworkError into a 400 response for invalid address inputs.
crates/defguard_core/src/error.rs Add WebError::IpNetwork to propagate address validation failures.
crates/defguard_core/src/enterprise/limits.rs Simplify DB error typing to sqlx::Result.
crates/defguard_core/src/enterprise/license.rs Use sqlx::Error directly in enterprise error enums.
crates/defguard_core/src/enterprise/ldap/model.rs Simplify DB error typing to sqlx::Result.
crates/defguard_core/src/enterprise/ldap/error.rs Use sqlx::Error directly in LDAP error enum.
crates/defguard_core/src/enterprise/firewall/tests/unapplied_rules.rs Update test locations to use validated host addresses.
crates/defguard_core/src/enterprise/firewall/tests/mod.rs Use address() accessor and update test locations for new address rules.
crates/defguard_core/src/enterprise/firewall/mod.rs Use address() accessor and simplify DB error typing to sqlx::Result.
crates/defguard_core/src/enterprise/directory_sync/tests.rs Update network creation to call set_address.
crates/defguard_core/src/enterprise/directory_sync/mod.rs Use sqlx::Error directly in directory sync error enum.
crates/defguard_core/src/enterprise/db/models/openid_provider.rs Simplify DB error typing to sqlx::Result.
crates/defguard_core/src/enterprise/db/models/api_tokens.rs Simplify DB error typing to sqlx::Result.
crates/defguard_core/src/enterprise/db/models/activity_log_stream.rs Simplify DB error typing to sqlx::Result.
crates/defguard_core/src/enterprise/db/models/acl/tests.rs Update ACL tests for new network constructor signature.
crates/defguard_core/src/enterprise/db/models/acl.rs Replace ad-hoc network queries with WireguardNetwork::all_for_rule; simplify DB error types.
crates/defguard_core/src/db/models/webhook.rs Simplify DB error typing to sqlx::Result.
crates/defguard_core/src/db/models/enrollment.rs Use sqlx::Error directly in token error enum.
crates/defguard_common/src/types/user_info.rs Simplify DB error typing to sqlx::Result.
crates/defguard_common/src/db/models/wireguard/tests.rs Add tests covering rejection of network/broadcast addresses.
crates/defguard_common/src/db/models/wireguard.rs Make address private; add validated setters; add helper queries; refactor defaults.
crates/defguard_common/src/db/models/webauthn.rs Simplify DB error typing to sqlx::Result.
crates/defguard_common/src/db/models/vpn_session_stats.rs Simplify DB error typing to sqlx::Result.
crates/defguard_common/src/db/models/vpn_client_session.rs Simplify DB error typing to sqlx::Result.
crates/defguard_common/src/db/models/user.rs Simplify DB error typing to sqlx::Result.
crates/defguard_common/src/db/models/setup_auto_adoption.rs Simplify DB error typing to sqlx::Result.
crates/defguard_common/src/db/models/session.rs Simplify DB error typing to sqlx::Result.
crates/defguard_common/src/db/models/polling_token.rs Simplify DB error typing to sqlx::Result.
crates/defguard_common/src/db/models/oauth2token.rs Simplify DB error typing to sqlx::Result.
crates/defguard_common/src/db/models/oauth2client.rs Simplify DB error typing to sqlx::Result.
crates/defguard_common/src/db/models/oauth2authorizedapp.rs Simplify DB error typing to sqlx::Result.
crates/defguard_common/src/db/models/migration_wizard.rs Simplify DB error typing to sqlx::Result.
crates/defguard_common/src/db/models/mfa_info.rs Simplify DB error typing to sqlx::Result.
crates/defguard_common/src/db/models/initial_setup_wizard.rs Simplify DB error typing to sqlx::Result.
crates/defguard_common/src/db/models/group.rs Simplify DB error typing to sqlx::Result.
crates/defguard_common/src/db/models/gateway.rs Simplify DB error typing to sqlx::Result.
crates/defguard_common/src/db/models/device_login.rs Simplify DB error typing to sqlx::Result.
crates/defguard_common/src/db/models/device.rs Remove device method query in favor of model helper; use address() accessor.
crates/defguard_common/src/db/models/biometric_auth.rs Simplify DB error typing to sqlx::Result.
crates/defguard_common/src/db/models/authentication_key.rs Simplify DB error typing to sqlx::Result.
crates/defguard_common/src/db/models/auth_code.rs Simplify DB error typing to sqlx::Result.
Cargo.lock Bump TOML-related dependencies (toml_* / winnow).
.sqlx/query-c58c7b4dc7463a93895b17d591e3e4a83ac3623590674e47bb1a1dbf9c25d77f.json Remove no-longer-used SQLx offline query artifact.
Files not reviewed (1)
  • .sqlx/query-c58c7b4dc7463a93895b17d591e3e4a83ac3623590674e47bb1a1dbf9c25d77f.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread crates/defguard_common/src/db/models/wireguard.rs
Comment thread crates/defguard_common/src/db/models/wireguard.rs Outdated
Comment thread crates/defguard_common/src/db/models/wireguard.rs
Comment thread crates/defguard_core/src/handlers/wireguard.rs
Comment thread crates/defguard_common/src/db/models/wireguard.rs
@moubctez moubctez merged commit e8ac801 into dev Mar 18, 2026
3 checks passed
@moubctez moubctez deleted the validate_location_address branch March 18, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants