mirror of
https://github.com/safing/portmaster
synced 2025-09-02 02:29:12 +00:00
Fix settings import validation
This commit is contained in:
parent
489c21ab5a
commit
8cb44bb11d
2 changed files with 2 additions and 2 deletions
|
@ -263,7 +263,7 @@ func ImportSettings(r *SettingsImportRequest) (*ImportResult, error) {
|
|||
}
|
||||
if checked < len(settings) {
|
||||
result.ContainsUnknown = true
|
||||
if !r.AllowUnknown {
|
||||
if !r.AllowUnknown && !r.ValidateOnly {
|
||||
return nil, fmt.Errorf("%w: the export contains unknown settings", ErrInvalidImportRequest)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -140,7 +140,7 @@ func parseExport(request *ImportRequest, export any) error {
|
|||
default:
|
||||
// Checksums not supported.
|
||||
}
|
||||
if err != nil && errors.Is(err, filesig.ErrChecksumMissing) {
|
||||
if err != nil && !errors.Is(err, filesig.ErrChecksumMissing) {
|
||||
return fmt.Errorf("failed to verify checksum: %w", err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue