Commit Graph

4963 Commits

Author SHA1 Message Date
jokob-sk
bdaa53cc53 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
2025-10-05 08:09:03 +11:00
jokob-sk
b2428803a5 LOG_LEVEL not respected #1217
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-10-05 08:08:44 +11:00
Jokob @NetAlertX
fc72abca85 Merge pull request #1213 from gonzague/patch-1
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Fix install script references in HW_INSTALL.md
2025-10-04 11:38:05 +10:00
Jokob @NetAlertX
2b52d5aec4 Merge pull request #1216 from adamoutler/patch-4
Update timestamp format to use UTC timezone
2025-10-04 11:35:55 +10:00
Adam Outler
ab3f9046d2 Update timestamp format to use UTC timezone
Remove deprecated API utilization.
2025-10-03 17:27:27 -04:00
Gonzague Dambricourt
521bf54123 Update HW_INSTALL.md
Fixing references to the Ubuntu install script
2025-10-03 10:40:03 +02:00
Jokob @NetAlertX
42eae405ae Merge pull request #1212 from JVKeller/baremetal-installer
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Baremetal installer
2025-10-03 07:51:23 +10:00
Jeff Keller
d7e6ff2688 Fix log permissions 2025-10-02 19:41:06 +00:00
Jeff Keller
b34269d043 Misc tweaks 2025-10-02 19:04:46 +00:00
Jeff Keller
683f4e6c2d Move clone before setting up python env 2025-10-02 18:53:37 +00:00
Jeff Keller
35cd8003b8 Fix logs 2025-10-02 18:38:00 +00:00
Jeff Keller
98d69e1ce8 Restart nginx 2025-10-02 18:17:43 +00:00
Jeff Keller
70d63febda Tweak log file paths 2025-10-02 18:14:51 +00:00
Jeff Keller
dd113f7940 testing 2025-10-02 16:45:59 +00:00
Jeff Keller
0aceb097ba Testing 2025-10-02 16:41:30 +00:00
Jeff Keller
7790530d08 Revert source repo 2025-10-02 16:05:31 +00:00
Jeff Keller
79cec583d9 NGINX configuration 2025-10-02 16:03:23 +00:00
rell3k
dd91d1e7da Merge branch 'jokob-sk:main' into baremetal-installer 2025-10-02 12:01:39 -04:00
Jeff Keller
aad5bec7e2 Single Debian/Ubuntu Installer 2025-10-02 16:00:19 +00:00
Jokob @NetAlertX
a9841157a7 Merge pull request #1211 from PreistlyPython/fix/issue-1210-compound-conditions
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
fix: Support compound conditions in SafeConditionBuilder (Issue #1210)
2025-10-02 16:11:30 +10:00
priestlypython
1c2721549b fix: Support compound conditions in SafeConditionBuilder (Issue #1210)
## Problem
PR #1182 introduced SafeConditionBuilder to prevent SQL injection, but it only
supported single-clause conditions. This broke notification filters using multiple
AND/OR clauses, causing user filters like:
`AND devLastIP NOT LIKE '192.168.50.%' AND devLastIP NOT LIKE '192.168.60.%'...`
to be rejected with "Unsupported condition pattern" errors.

## Root Cause
The `_parse_condition()` method used regex patterns that only matched single
conditions. When multiple clauses were chained, the entire string failed to match
any pattern and was rejected for security.

## Solution
Enhanced SafeConditionBuilder with compound condition support:

1. **Added `_is_compound_condition()`** - Detects multiple logical operators
   while respecting quoted strings

2. **Added `_parse_compound_condition()`** - Splits compound conditions into
   individual clauses and parses each one

3. **Added `_split_by_logical_operators()`** - Intelligently splits on AND/OR
   while preserving operators in quoted strings

4. **Refactored `_parse_condition()`** - Routes to compound or single parser

5. **Created `_parse_single_condition()`** - Handles individual clauses (from
   original `_parse_condition` logic)

## Testing
- Added comprehensive test suite (19 tests, 100% passing)
- Tested user's exact failing filter (6 AND clauses with NOT LIKE)
- Verified backward compatibility with single conditions
- Validated security (SQL injection attempts still blocked)
- Tested edge cases (mixed AND/OR, whitespace, empty conditions)

## Impact
-  Fixes reported issue #1210
-  Maintains all security protections from PR #1182
-  Backward compatible with existing single-clause filters
-  No breaking changes to API

Fixes #1210

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-01 18:31:49 -07:00
jokob-sk
4534ab053d TIMEZONE not respected in System Info -> System #1055
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-10-02 06:45:37 +10:00
Jeff Keller
cdee9b3b0d Permissions 2025-10-01 20:33:12 +00:00
Jeff Keller
55cfced3f6 Comment out line 2025-10-01 19:41:51 +00:00
Jeff Keller
af6394a334 Tweak permissions
Tighten security
2025-10-01 19:34:47 +00:00
Jeff Keller
d9ecffdd22 Cleanup 2025-10-01 19:09:49 +00:00
Jeff Keller
5f0a482556 bug fix 2025-10-01 18:58:05 +00:00
Jeff Keller
09c345796f fix typo 2025-10-01 18:33:44 +00:00
Jeff Keller
e7d067dd38 tweaks 2025-10-01 18:15:28 +00:00
Jeff Keller
223aa29d4d tweaks 2025-10-01 17:40:12 +00:00
rell3k
21e770a4bd Create netalertx.conf 2025-10-01 11:25:15 -04:00
Jeff Keller
c086ac3cf8 Merge Deb/Ubuntu 2025-10-01 15:22:21 +00:00
Jeff Keller
f900f3f0d5 Resolve merge: keep proxmox installer and add README for Proxmox installer 2025-09-30 13:38:31 +00:00
jokob-sk
5f772b3e0f docs
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
v25.10.1
2025-09-29 13:11:58 +10:00
jokob-sk
7015ba2f86 LOADED_PLUGINS not processed #1195
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-09-29 08:04:53 +10:00
Jokob @NetAlertX
8485f6fe48 Merge pull request #1205 from ingoratsdorf/mqtt-optimisations
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Mqtt optimisations and TZ fixes
2025-09-28 20:22:50 +10:00
Ingo Ratsdorf
e3327d8718 adding CodeRabbit suggestion plus disconnect() 2025-09-28 19:08:38 +13:00
Ingo Ratsdorf
af986aa540 Fixes timezone issue in publishing
Ref: Issue https://github.com/jokob-sk/NetAlertX/issues/1204
2025-09-28 17:29:21 +13:00
Ingo Ratsdorf
06c38322ed tweaks 2025-09-28 16:09:21 +13:00
Ingo Ratsdorf
3ece89379f Merge branch 'jokob-sk:main' into mqtt-optimisations 2025-09-28 15:33:43 +13:00
Jokob @NetAlertX
d9fedddae2 Merge pull request #1203 from ingoratsdorf/pluginloader-fix
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Make plugin loader more robust
2025-09-27 16:26:30 +10:00
Jokob @NetAlertX
1fc015fe2d Merge pull request #1202 from ingoratsdorf/scheduler-fix
make scheduler setup more robust against wrong scheduling
2025-09-27 16:24:24 +10:00
Ingo Ratsdorf
5395524511 Make plugin loader more robust
Against stray folders, leftover artefacts and missing configs
2025-09-27 17:20:34 +12:00
Ingo Ratsdorf
4fef4a7dd4 make scheduler setup more robust against wrong scheduling
is the schedule input is incorrect, an error message is logged and the plugin will NOT run.
Creating a dummy schedule would throw the system out of balance as there's the danger of schedules running out of sync.
2025-09-27 16:52:50 +12:00
Jokob @NetAlertX
2c8fa55edb Merge pull request #1201 from ingoratsdorf/ubuntu24-rewrite
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Ubuntu 24 Installer rewrite
2025-09-27 12:16:51 +10:00
Ingo Ratsdorf
246777a290 Ubuntu 24 Installer rewrite
`setup.sh` and `start.sh` combined into a single script
netalertx now starts and runs via systemd unit, can be started, stopped and restarted
`systemctl start netalertx`
`systemctl stop netalertx`
`systemctl status netalertx`
etc
Logs to `journalctl` and output can be followed with `journalctl -f`

Amalgamated chmods
tuned chmods based on earlier feedback and discussion

install script accepts command line parameter:
- 'install' to continue and DELETE ALL!
- 'update' to just update from GIT (keeps your db and settings)
- 'start' to do nothing, leave install as-is (just run the start script, set up services etc)

Please have a look, comments welcome :-)
2025-09-27 13:18:43 +12:00
Ingo Ratsdorf
1823a8139b Merge branch 'jokob-sk:main' into mqtt-optimisations 2025-09-25 19:43:09 +12:00
Jokob @NetAlertX
3dd5c4bfcc Merge pull request #1194 from adamoutler/patch-3
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled
Rework Logging in restart-backend.sh
2025-09-24 15:46:26 +10:00
Adam Outler
d843fd4443 Apply suggestion from @coderabbitai[bot]
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-23 12:00:59 -04:00
Adam Outler
9dda02d430 Modify restart script to overwrite log files 2025-09-23 11:59:52 -04:00