luci-app-adblock-fast: update to 1.2.4-2
Maintainer: me
Compile tested: x86_64, Dell EMC Edge620, OpenWrt 25.12.4
Run tested: x86_64, Dell EMC Edge620, OpenWrt 25.12.4
Description:
Update to 1.2.4-2
- Update PKG_VERSION to 1.2.4 and PKG_RELEASE to 2.
README.md:
- Update documentation URL from melmac.ca to mossdef.org.
htdocs/luci-static/resources/adblock-fast/status.js:
- Update `pkg.LuciCompat` to 17.
- Add `pkg.ChromeExtensionId` for the companion browser extension.
- Update documentation URLs from melmac.ca to mossdef.org.
- Add new warning messages for throttled parallel downloads and download
timeouts.
- Update `errorDetectingFileType` message to include the filename.
- Update `syncCron` RPC: it now accepts schedule parameters (e.g.,
`auto_update_enabled`, `auto_update_mode`) as distinct arguments instead
of relying on UCI. The cron line is assembled and validated server-side.
- Remove `setCronEntry` RPC, replaced by the extended `syncCron`.
- Wrap `_syncCron` with a `syncCron` helper function that translates the
schedule object into discrete arguments for the RPC call.
htdocs/luci-static/resources/view/adblock-fast/overview.js:
- Add `maybeNagChromeExtension` to detect the AdBlock-Fast Controller
Chrome extension and nag if missing.
- Remove `generateCronEntry` helper function: the cron line is now
assembled server-side.
- Mark auto_update_* form fields as virtual: they are displayed from parsed
cron data and submitted via `syncCron`, but never written to UCI.
- Add new advanced options for download: `download_connect_timeout`,
`download_max_time`, and `download_allow_insecure`.
- Update `parallel_downloads` to be a range (1-16) instead of a boolean
flag, with a default of 8. The label now indicates automatic reduction
with low memory.
- Modify `handleSave` and `handleSaveApply` to collect schedule data and
pass it to `adb.syncCron` as discrete fields, bypassing UCI writes for
scheduling. This ensures the crontab is the single source of truth for
the schedule.
root/etc/uci-defaults/40_luci-adblock-fast:
- Add logic to remove stale `auto_update_*` UCI keys from older versions,
as the cron schedule is no longer mirrored in UCI.
root/usr/share/rpcd/acl.d/luci-app-adblock-fast.json:
- Remove `setCronEntry` from ACL, as it has been replaced by `syncCron`.
root/usr/share/rpcd/ucode/luci.adblock-fast:
- Update `rpcdCompat` to 17.
- Remove explicit `setCronEntry` call from the example section.
- Update `syncCron` example: it now includes schedule parameters, replacing
`setCronEntry`.
- Add `cron_field` helper function to coerce schedule fields to bounded
integers, providing security against injection into crontabs.
- Add `CRON_MODES` constant to allowlist accepted scheduling modes.
- Update `cron_write` to accept `schedule` object with discrete fields.
It now parses existing cron lines to preserve the schedule on state-only
changes and validates all fields through `cron_field`/`CRON_MODES`.
- Rename `get_cron_status` to `cron_read`, reflecting its read-only nature.
- Update `cron_read` to parse the crontab line and return the schedule as
strings, eliminating reliance on UCI for schedule configuration. The UI
now parses this entry for display.
- Refactor cron management functions (`update_cron`, `get_cron_status`)
for improved security, robustness, and to remove UCI as a source of
truth for cron schedule.
Signed-off-by: Stan Grishin <redacted>