Commit Graph
283 Commits
Author SHA1 Message Date
Panagiotis Koilakos 6dbd3f8f29 BE: escape backslashes when serializing string settings to app.conf
app.conf is written by util.php saveSettings() as Python source and later
compiled/exec'd by the backend. String settings were emitted into
single-quoted Python literals with only ' encoded (as {s-quote}), so
backslashes were written raw. A regex such as 192\.0\.2\..* then produced
"SyntaxWarning: invalid escape sequence '\.'", valid Python escapes such as
\n were silently reinterpreted, and a trailing backslash made the file fail
to compile.

Move the encoder into a side-effect-free helper, app_conf_encode.php, as
encode_python_string(). It now doubles backslashes before the existing
{s-quote} replacement, so backslashes round-trip unchanged through app.conf
serialization and Python parsing, while single quotes keep using the legacy
{s-quote} placeholder. Both scalar string and array string serialization use
the helper.

Add regression tests that run the real PHP helper through the PHP CLI,
compile the generated source with warnings promoted to errors, and check
the scalar and array round trips.
2026-09-28 19:54:45 +02:00
jokob-sk 6ab220fd8c BE+FE: async event execution 2026-09-14 18:17:06 +10:00
jokob-sk 1aea4e8216 DOCS: email 2026-07-25 10:25:33 +10:00
jokob-sk 2396bb610a DOCS: email update 2026-07-25 08:11:08 +10:00
jokob-sk 1636d155c7 BE+FE: report findinfg fixes + css 2026-07-12 10:26:53 +10:00
Jokob @NetAlertX 102a62c8b7 FE: enhance settings save functionality with reload wait detection and background processing 2026-06-21 00:57:17 +00:00
jokob-sk 11499a6890 chore: jokob-sk->netalertx
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2026-02-28 15:58:46 +11:00
Jokob @NetAlertX 63cef590d6 Refactor network API calls to use centralized authentication context and improve cache handling
- Removed redundant getApiToken function and replaced its usage with getAuthContext in network-api.js, network-events.js, and network-init.js.
- Updated cache handling in network-events.js and network-init.js to use CACHE_KEYS constants for better maintainability.
- Introduced cache.js for centralized cache management functions and constants, including cache initialization and retrieval.
- Added app-init.js for application lifecycle management, including cache orchestration and initialization checks.
- Created app_config.php to securely fetch API token and GraphQL port from configuration.
- Improved error handling and logging throughout the codebase for better debugging and maintenance.
2026-02-26 04:21:29 +00:00
Jokob @NetAlertX 206c2e76d0 FE: replace write_notification calls with displayInAppNoti for consistent notification handling 2026-01-11 03:39:48 +00:00
Jokob @NetAlertX 8458bbb0ed FE: remove unused checkPermissions function and its call in settings 2026-01-11 03:26:45 +00:00
Jokob @NetAlertX c8c70d27ff FE: update API calls to use new endpoint; enhance settings form submission tests 2026-01-11 03:14:41 +00:00
jokob-sk 09325608f8 FE: legacy code cleanup
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2026-01-11 11:24:12 +11:00
jokob-sk 07277985b1 FE: refactor apiBase
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2026-01-10 08:46:16 +11:00
jokob-sk 6e194185ed FE+BE: use of new events endpoint, devMAC -> devMac
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2026-01-03 12:05:56 +11:00
jokob-sk ee5de27413 FE+BE: deviceDetials migration to graphQL endpoints
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-12-25 11:39:28 +11:00
jokob-sk 5cd4139d01 FE+BE: cleanup
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-12-18 17:16:17 +11:00
jokob-sk daa720ab94 FE+BE: init check work, removed legacy setDeviceData
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-12-18 09:02:57 +11:00
jokob-sk 00a47ab5d3 FE: config backups saved in incorrect location #1311
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-11-30 07:42:11 +11:00
Adam Outler e3458630ba Convert from crond to supercronic 2025-11-23 01:14:21 +00: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
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-11-09 18:50:16 +11:00
Adam Outler 62536e4bfb Coderabit suggestions 2025-10-18 14:07:27 -04:00
Adam Outler 7483e46dce Merge remote-tracking branch 'origin/main' into hardening 2025-10-18 13:23:57 -04:00
jokob-sk e4d3a50391 FE: API in-app messaging endpoint
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-10-10 17:01:14 +11:00
Adam Outler 016a6adf42 Dockerfile.debian building and running 2025-10-08 19:55:16 -04:00
Adam Outler 041e97d741 Change default encryption key to an empty string 2025-09-20 18:12:58 -04:00
jokob-sk c0c685c561 FE code disclaimers
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
2025-08-29 08:09:29 +10:00
jokob-sk 3dc87d2adb FE 2025-08-20 08:59:42 +10:00
jokob-sk 0777824d96 FE 2025-08-20 08:50:35 +10:00
jokob-sk 5fd30fe3c8 FE 2025-08-20 08:41:38 +10:00
jokob-sk a2bccdfb8e FE 2025-08-20 08:11:56 +10:00
jokob-sk 962bbaa5a1 api layer v0.2.2 - CSV import/export, refactor 2025-08-19 07:56:54 +10:00
jokob-sk b155fe2b06 api layer v0.1 2025-08-15 08:04:02 +10:00
jokob-sk f5f7031030 copy icon issue #1128 2025-08-02 07:56:57 +10:00
jokob-sk 170a3c0ae1 presence rework #1119, plugin history filter 2025-07-26 08:45:07 +10:00
jokob-sk 0444e338ec indexes 4 the win 2025-07-21 09:15:40 +10:00
jokob-sk 61de54bc34 net refactor 2025-07-14 11:01:16 +10:00
jokob-sk 393c3fd3b6 nics work 724 2025-07-13 09:02:21 +10:00
jokob-sk 6f536f9952 ntfy disable cert #1117, initial nics work #724 2025-07-12 15:40:08 +10:00
jokob-sk f4a3717859 FQDN, Dig refactor, docs #1065 2025-06-01 13:59:54 +10:00
jokob-sk 7e5373b2cd wf work 2025-03-27 21:23:11 +11:00
jokob-sk 432a4d9d69 Initial commit on next_release branch 2025-03-10 07:42:44 +11:00
jokob-sk 6b390b66de report cleanup + #960 2025-01-19 12:56:00 +11:00
jokob-sk 6ad90610ea Docs, small fixes 2025-01-11 20:20:09 +11:00
jokob-sk b4e741568b Extending Maintenance w/ app.conf (im/ex)port 2025-01-11 11:23:32 +11:00
jokob-sk 540f8e850b DUMMY as new device source plugin 2025-01-08 23:00:03 +11:00
jokob-sk 729c24029f docs + fixes to CustomProps 2025-01-02 10:15:58 +11:00
jokob-sk 2799d3598b docs 2024-12-31 15:24:51 +11:00
jokob-sk e52601e062 ENCRYPTION_KEY, docs 2024-12-31 10:14:01 +11:00