Skip to content

Commit 325fdff

Browse files
po-nuvaiclaude
andcommitted
fix(ui): use temporary duration when popup times out (#1385)
When a popup expires without user interaction, now always uses "once" duration instead of the configured default. This prevents creating permanent blanket deny rules when the user is away from the machine. Before: popup timeout -> applies all default settings including "forever" After: popup timeout -> applies action but forces duration to "once" Only explicit user confirmation (clicking Allow/Deny) should create permanent rules. Unattended timeouts are now conservative. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent e3cf78c commit 325fdff

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ui/opensnitch/dialogs/prompt/dialog.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,13 @@ def _send_rule(self):
585585
self._rule = ui_pb2.Rule(name="user.choice")
586586
self._rule.created = int(datetime.now().timestamp())
587587
self._rule.enabled = True
588-
self._rule.duration = utils.get_duration(self.durationCombo.currentIndex())
588+
# If the popup timed out without user interaction, always use "once" duration
589+
# to avoid creating permanent rules when the user is away (#1385).
590+
# Only explicit user confirmation should create permanent rules.
591+
if self._timeout_triggered:
592+
self._rule.duration = Config.DURATION_ONCE
593+
else:
594+
self._rule.duration = utils.get_duration(self.durationCombo.currentIndex())
589595

590596
self._rule.action = Config.ACTION_ALLOW
591597
if self._default_action == Config.ACTION_DENY_IDX:

0 commit comments

Comments
 (0)