Commit Graph

80 Commits

Author SHA1 Message Date
Jokob @NetAlertX
f5d7c0f9a0 Merge pull request #1302 from adamoutler/supercronic
Replace crond with Supercronic, improve cron logging & backend restart behavior
2025-11-24 07:29:50 +11:00
Adam Outler
240d86bf1e docker tests 2025-11-23 16:31:04 +00:00
Adam Outler
274fd50a92 Adjust healthchecks and fix docker test scripts 2025-11-23 15:56:42 +00:00
Jokob @NetAlertX
4f5a40ffce lint and test fixes 2025-11-22 10:52:12 +00:00
jokob-sk
ebeb7a07af BE: linting fixes 2
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-11-22 20:43:36 +11:00
jokob-sk
5c14b34a8b BE: linting fixes
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-11-22 13:14:06 +11:00
jokob-sk
f0abd500d9 BE: test fixes
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
Code checks / lint (push) Has been cancelled
Code checks / docker-tests (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-11-21 05:54:19 +11:00
jokob-sk
8503cb86f1 BE: test fixes
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-11-21 05:43:30 +11:00
Adam Outler
d13596c35c Coderabbit suggestion 2025-11-17 20:27:27 +00:00
Adam Outler
f1ecc61de3 Tests Passing 2025-11-17 02:45:42 +00:00
Jokob @NetAlertX
61b42b4fea BE: Fixed or removed failing tests - can be re-added later 2025-11-14 11:18:56 +00:00
Jokob @NetAlertX
a45de018fb BE: Test fixes 2025-11-14 10:46:35 +00:00
Adam Outler
9c366881f1 Fix for ports 2025-11-12 12:02:31 +00:00
jokob-sk
93af0e9d19 BE: fixing imports
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-11-10 12:45:06 +11:00
jokob-sk
a98bac331d MERGE: resolve conflicts
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-11-10 10:11:34 +11:00
Adam Outler
5b871865db /data and /tmp standarization 2025-11-09 17:03:25 +00:00
jokob-sk
8483a741b4 BE: LangStrings /graphql + /logs endpoint, utils chores
Some checks failed
docker / docker_dev (push) Has been cancelled
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-11-09 18:50:16 +11:00
jokob-sk
c08eb1dbba BE: chore datetime_utils
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-11-05 16:08:04 +11:00
jokob-sk
ea8cea16c5 TEST: cleanup
Some checks failed
docker / docker_dev (push) Has been cancelled
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-11-04 20:01:27 +11:00
jokob-sk
dc4da5b4c9 BE/PLG: TZ timestamp work #1251
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-11-04 19:44:30 +11:00
jokob-sk
59477e7b38 BE/PLG: TZ timestamp work #1251
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-11-04 19:24:13 +11:00
jokob-sk
c52e44f90c BE/PLG: TZ timestamp work #1251
Some checks failed
docker / docker_dev (push) Has been cancelled
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-11-04 08:10:50 +11:00
Adam Outler
23a0fac973 Address Coderabbit issue 2025-11-01 23:54:54 +00:00
Adam Outler
db5381db14 Update test/docker_tests/test_docker_compose_scenarios.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-11-01 15:12:54 -04:00
Adam Outler
f1fbc47508 coderabbit required fix 2025-11-01 19:04:31 +00:00
Adam Outler
2a9d352322 Update test/docker_tests/configurations/test_all_docker_composes.sh
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-11-01 14:57:57 -04:00
Adam Outler
51aa3d4a2e coderabbit 2025-11-01 18:53:07 +00:00
Adam Outler
70373b1fbd Address coderabbit-discoverd issues 2025-11-01 18:18:32 +00:00
Adam Outler
a6bc96d2dd Corrections on testing and behaviors 2025-11-01 03:57:52 +00:00
Adam Outler
1e63cec37c Revise tests. Use docker-compose.yml where possible 2025-10-31 22:24:08 +00:00
Adam Outler
d29700acf8 New mount test structure. 2025-10-31 00:07:34 +00:00
Adam Outler
b36b3be176 Fix permissions messages and test parms 2025-10-29 00:08:09 +00:00
Adam Outler
7ddb7d293e new method of fixing permissions 2025-10-28 23:58:02 +00:00
Adam Outler
a6ac492d76 Add APP_CONF_OVERRIDE support 2025-10-27 20:19:17 +00:00
Adam Outler
d8c2dc0563 Apply coderabit's latest hare-brained idea 2025-10-26 19:58:57 +00:00
Adam Outler
cfffaf4503 Strengthen tests 2025-10-26 19:40:17 +00:00
Adam Outler
01b64cce66 Changes requested by coderabbit. 2025-10-26 19:34:28 +00:00
Adam Outler
5ec35aa50e Build the netalertx-test image on start so tests don't fail 2025-10-26 18:12:02 +00:00
Adam Outler
ededd39d5b Coderabbit fixes 2025-10-26 17:53:46 +00:00
Adam Outler
d2c28f6a28 Changes for tests identified by CodeRabbit 2025-10-26 15:30:03 +00:00
Adam Outler
fb02774814 Fix errors for tests 2025-10-26 00:14:03 +00:00
Adam Outler
c4a041e6e1 Coderabit changes 2025-10-25 17:58:21 +00:00
Adam Outler
32f9111f66 Restore test_safe_builder_unit.py to upstream version (remove local changes) 2025-10-24 20:32:50 +00:00
Adam Outler
edd5bd27b0 Devcontainer setup 2025-10-23 23:33:04 +00:00
Adam Outler
3b7830b922 Add unit tests and updated messages 2025-10-23 21:15:15 +00:00
Adam Outler
ce8bb53bc8 Refine devcontainer setup and docker tests 2025-10-22 19:48:58 -04:00
jokob-sk
b59bca2967 BE: API in-app messaging endpoint
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-10-10 17:00:53 +11:00
jokob-sk
d05ddafdd3 logger not repsecting new lines #1217
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-10-05 14:02:00 +11: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
a981c9eec1 integration tests cleanup
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-09-21 16:17:20 +10:00