Correcting an app policy file leaves its details hidden until FreeSnitch restarts
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
Research direction
Start with the cache read and write in Sources/Shared/InternetAccessPolicy.swift:177-188 and the invalid or unreadable policy handling at lines 200-231; then check how RulesManager.swift:1122-1126 uses a nil result. Reproduce the steps with an invalid JSON policy, correct it, and select the rule again. Done when its ApplicationDescription appears without restarting FreeSnitch.
Written by the indexing model from the issue text.
Description
InternetAccessPolicy.swift:177-188 caches both successful reads and nil results using cache[bundlePath] = CacheEntry(policy: policy). Invalid or unreadable files return nil at lines 208-214, and there is no invalidation before the next selection. RulesManager.swift:1122-1126 omits the details when that cached result is nil, even after the file is corrected. This affects optional inspector details, not filtering; a valid alternate-format policy already works as a fallback on the initial read.
Steps
- Select a rule for a disposable app with an invalid InternetAccessPolicy.json and no valid plist fallback.
- Correct the JSON in place to a valid policy with ApplicationDescription.
- Select the rule again.
- The policy details remain hidden because the cached nil result prevents another read.
Where
Sources/Shared/InternetAccessPolicy.swift:177-188Sources/Shared/InternetAccessPolicy.swift:200-231Sources/GUI/Views/RulesManager.swift:1122-1126
Done when: Corrected app policy metadata becomes visible without restarting FreeSnitch.
Related: #250
I found this reading the code.
- Dominant language
- Swift
- Stars
- 49
- Forks
- 5
- Avg merge
- 16h 48m
- Merged PRs (30d)
- 82
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from isaaclins/freesnitch
-
area:cli documentation good first issue priority:low
Difficulty 1/5 Under an hour Newbie friendliness 94/100
isaaclins/freesnitch#430 ·
Maintainers usually reply within 1 day
-
area:gui bug priority:low status:queued
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
isaaclins/freesnitch#428 ·
Maintainers usually reply within 1 day
-
area:shared bug priority:high status:queued type:correctness
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
isaaclins/freesnitch#284 ·
Maintainers usually reply within 1 day
-
area:helper bug priority:medium status:queued type:diagnostics
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
isaaclins/freesnitch#282 ·
Maintainers usually reply within 1 day
-
area:netext bug priority:medium status:queued type:diagnostics
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
isaaclins/freesnitch#280 ·
Maintainers usually reply within 1 day
All issues in isaaclins/freesnitch
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
good first issue help wanted testing
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
MasterJ93/ATProtoKit#354 ·
-
enhancement help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
heysidhant/appvanish#4 ·
-
bug priority:low status:queued
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day