The system firewall view has 2 hidden columns: one that is always
hidden, and another one that is dynamically displayed, based on the
filter selected (System fw menu -> node -> fw table -> fw chain).
The table header context menu was not working properly, so the code to
make it work has been added, but the functionality has been disabled
until we handle properly the visibility of the up/down buttons column.
See: #1548.
Modified the Database.remove method to accept an optional `args` parameter to support parameterized queries. Replaced string formatting of user inputs with parameterized variables in `dialogs/events/dialog.py` and `dialogs/events/views.py` to prevent SQL injection vulnerabilities.
Co-authored-by: kh3ldoun <21332335+kh3ldoun@users.noreply.github.com>
Up until now, we were only able to list events with a fixed limit, or
with not limit at all, but there was no support for continuous scrolling.
Now when the scrollbar reaches the bottom of the viewport, the view
will fetch the next batch of events, constrained by the limit option.
feature request: #1440
for consistency. "forever" is used for the pop-ups in several places,
the pop-ups and the Preferences dialog.
Internally the daemon uses "always".
Closes: #1532
Fixes crash when pressing 'accept' with keyboard when mouse cursor is
not on top of the popup.
> Traceback (most recent call last):
> File "/path/to/opensnitch/dialogs/prompt/dialog.py", line 288, in _check_advanced_toggled
> self.move_popup()
> ~~~~~~~~~~~~~~~^^
> File "/path/to/opensnitch/dialogs/prompt/dialog.py", line 254, in move_popup
> point = self.screen().virtualSiblingAt(QtGui.QCursor.pos()).availableGeometry()
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> AttributeError: 'NoneType' object has no attribute 'availableGeometry'
> Fatal Python error: Aborted
When displaying a new pop-up, we set the default target based on:
- snap or appimages paths.
- user's preferences.
In order to respect user's preferences, the process path and cmdline
must be non-empty. If any of these properties is empty, then we
select by default the Destination Port of the connection.
However, in some cases the cmdline is empty while the path is not, but
we end up selecting the destination port as the default target anyway,
which causes confusion and in some cases too much pop-ups.
Now, if the cmdline is empty and the path is not, we'll select the path
of the process as the default target.
see #1521 for more details.
Dump the rows of the current query, and copy only the rows selected by
the user.
Previously we kept a copy of all selected cells in memory, all the time,
while the rows were selected.
- free copied rows after writing it to the clipboard.
- when dumping rows from the db, re-use existing query object if the
query hasn't changed.
- misc.
- Select rows properly when the mouse goes off the viewport while
selecting.
- Reuse the internal QSqlQuery object when dumping rows.
- Allow to select ranges with shift+KeyHome/KeyEnd
- KeyDown (arrow) scrolls the view by one row, instead of paginate it.
We already have Space and PageUp/PageDown keys for it.
Use the configured headers in the table model to show/hide columns,
instead of using the ones defined in the default configuration.
Plugins can add columns to the views, so this way we allow to show/hide
columns configured by the plugins.