fix: Prevent unintended use of SPN nodes when intel data is not yet applied

Related Issue Details:
In some situations, SPN intel data was not fully applied.
This lead to Portmaster making connections that don’t align with the intended intel preferences.

https://github.com/safing/portmaster/issues/1999
https://github.com/safing/portmaster-shadow/issues/35
This commit is contained in:
Alexandr Stelnykovych
2025-09-02 18:26:34 +03:00
parent d67c8e9a04
commit 7a95b021a5
5 changed files with 28 additions and 5 deletions

View File

@@ -246,6 +246,14 @@ func (o *HubOptions) Matcher(hubType HubType, hubIntel *hub.Intel) PinMatcher {
return false
}
// Check if all required states from intel were applied.
if regard.HasAnyOf(StateSummaryStatusesAppliedFromIntel) || disregard.HasAnyOf(StateSummaryStatusesAppliedFromIntel) {
if pin.stateIntelApplied.IsNotSet() {
log.Warningf("spn/navigator: pin %s skipped as intel statuses were not applied", pin.Hub.ID)
return false
}
}
// Check verified owners.
if len(o.RequireVerifiedOwners) > 0 {
// Check if Pin has a verified owner at all.