Skip to content

Commit c61a06d

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 e6da809 commit c61a06d

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
@@ -599,7 +599,13 @@ def _send_rule(self):
599599
self._rule = ui_pb2.Rule(name="user.choice")
600600
self._rule.created = int(datetime.now().timestamp())
601601
self._rule.enabled = True
602-
self._rule.duration = utils.get_duration(self.durationCombo.currentIndex())
602+
# If the popup timed out without user interaction, always use "once" duration
603+
# to avoid creating permanent rules when the user is away (#1385).
604+
# Only explicit user confirmation should create permanent rules.
605+
if self._timeout_triggered:
606+
self._rule.duration = Config.DURATION_ONCE
607+
else:
608+
self._rule.duration = utils.get_duration(self.durationCombo.currentIndex())
603609

604610
self._rule.action = Config.ACTION_ALLOW
605611
if self._default_action == Config.ACTION_DENY_IDX:

0 commit comments

Comments
 (0)