Commit Graph
102 Commits
Author SHA1 Message Date
Panagiotis Koilakos 1c3139bb7b BE: address app.conf escaping review feedback
Keep encode_python_string() in front/php/server/util.php, replacing
encode_single_quotes() in place, and remove the standalone
app_conf_encode.php helper file and its require.

Rework the regression test to dispatch the real util.php savesettings
path through the PHP CLI against temporary synthetic config, API and
session directories, covering both scalar string and array string
settings: the generated app.conf must compile with warnings as errors
and parse back to the typed values.

The existing {s-quote} lifecycle is preserved (single quotes are still
written as {s-quote} and converted back by the same consumers), and the
app.conf readers in initialise.py and plugin_helper.py are unchanged.
2026-09-29 23:11:07 +02:00
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 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 @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 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 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
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 2799d3598b docs 2024-12-31 15:24:51 +11:00
jokob-sk 0f474fb884 Custom Device Properties v0.1 #876 2024-12-27 12:42:15 +11:00
jokob-sk f7160f0843 Move of API folder from /app/front/api to app/api 2024-12-08 19:17:10 +11:00
jokob-sk afaac3277d Device Edit Rebuild + New Dummy Device 2024-11-30 23:34:20 +11:00
jokob-sk f1f40021ee chore:Settings DB table refactor 2024-11-23 09:28:40 +11:00
jokob-sk 0e438ffd57 chore:PHOLUS removal 2024-11-22 20:32:49 +11:00
jokob-sk 0bc8b39cec 🔺GraphQL v0.1 + Devices table rebuild + removal of backend compatible scripts 2024-11-10 21:22:45 +11:00
jokob-sk abd2f66814 🆕Source Plugin Column 2024-10-19 12:03:20 +11:00
jokob-sk 02077d4654 CSV Export - encode quotes #808 2024-09-29 08:18:00 +10:00
jokob-sk c58bbf21b1 chore: 🧹 Code Cleanup 2024-09-28 10:28:05 +10:00
jokob-sk cac33fde2b ⚙ Settings rework 2 2024-07-09 20:27:48 +10:00
jokob-sk 6ea3d14480 ⚙ Settings rework 2024-07-07 23:11:30 +10:00
jokob-sk eff98257d6 🔌 Omada work #708 2024-07-05 23:53:55 +10:00
jokob-sk b6451e6e76 ▶ Ad-hoc event bug fix 2024-07-01 21:07:51 +10:00
jokob-sk 08b163ebe4 🛠Maintenance refactor 2024-06-29 14:39:12 +10:00
jokob-sk a52e315732 📚Docs, QoL improvements 2024-06-21 16:44:03 +10:00
jokob-sk 3a1a6c8dac 📃 Plugin __template + OMADA SDN v0.1 #708 2024-06-15 10:54:55 +10:00
jokob-sk 1d525cb84c 🔃 Sync Hub v0.8.1 + CSS fixes + Empty settings sanity check + JSON linting + docs 2024-06-08 18:01:58 +10:00
jokob-sk 23703e4e22 🔃 Sync Hub v0.6.4 - Guid, SyncHubNodeName added 2024-06-06 23:00:05 +10:00
jokob-sk bb2beda12a ⚙ settings saving improvements + refactor - DB lock v0.1 #685 2024-05-29 19:24:43 +10:00
jokob-sk 03f82d9510 Loading plugins v 0.5 🔌 2024-05-20 08:14:36 +10:00
jokob-sk 003fc557cd 🔐PWD work #634 2024-04-20 10:14:22 +10:00
jokob-sk 5cb7553ed5 Rename work 🏗 2024-04-12 19:44:29 +10:00
jokob-sk 775a119f32 More rename work 2024-04-07 12:38:17 +10:00
jokob-sk 7653ddce63 PiAlert -> NetAlertX ✍ 2024-04-07 09:44:37 +10:00
Jokob-sk 4f5fbb1316 Multi-edit ✏ #571 2024-02-24 13:30:18 +11:00
Jokob-sk fd162ff98a Notification Report page rewrite v0.1📩 2023-10-25 22:35:07 +11:00
Jokob-sk 0ed24dac0a Frontend user events rewrite v0.1 2023-10-25 08:11:57 +11:00
Jokob-sk 1a3cf49c00 PERMISSIONS, MQTT, Maintenance work⤵ 2023-10-18 22:35:36 +11:00
Jokob-sk 07367a2ca3 NETWORK_DEVICE_TYPES #452 2023-09-22 08:22:28 +10:00
Jokob-sk a5b952f18c db_cleanup plugin 2023-09-17 21:46:05 +10:00
Jokob-sk 11f341366b Events, CurrentScan, pluginsState, APPRISE work 2023-08-13 09:26:30 +10:00
Jokob-sk 5397edc14d Events, CurrentScan, pluginsState, ENABLE_PLUGINS work 2023-08-12 11:56:35 +10:00