Repository navigation
webui: name the object in the delete confirmation dialogs - #213
Conversation
This applies OpenCCU rootfs patch 0156-WebUI-ImprovedConfirmDeletePopup.patch including the fix of OpenCCU/OpenCCU#4458: - The delete confirmation dialogs of system variables, users, favorites and direct links name the object to be deleted ('%s' in the translations). - The names are encoded for the JavaScript string in ReGa (\xNN for backslash, quotes, angle brackets and ampersand) and HTML-escaped before they are inserted into the dialog text.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Original OpenCCU rootfs patch: 0156
Original filename:
0156-WebUI-ImprovedConfirmDeletePopup.patchOriginal patch: ``''
https://github.com/OpenCCU/OpenCCU/blob/fef410df1906f72227f878ff755d9a8a13e6f800/buildroot-external/package/openccu-base/rootfs-patches/0156-WebUI-ImprovedConfirmDeletePopup.patch''''(as fixed by OpenCCU/OpenCCU#4458)Original changes: OpenCCU/OpenCCU@55f2980b3 (OpenCCU/OpenCCU#1579)
Fixes before migration: OpenCCU/OpenCCU#4458 (escaping of the names, German word order)
The delete confirmation dialogs of system variables, users, favorites and direct links only asked "Do you really want to delete the …?" without naming the object. This applies the patch, including the fix of OpenCCU/OpenCCU#4458:
src/webui/rega/www/pages/tabs/admin/systemvars.htm,src/webui/rega/www/pages/tabs/admin/userAdministration.htm,src/webui/rega/www/pages/tabs/user/favOverview.htm: the delete buttons pass the name of the object toDeleteSysVar(),deleteUser()andDeleteFavorite(), which insert it for%sinto the question.onclickattribute in ReGa:\,',",<,>and&become\x5C,\x27,\x22,\x3C,\x3Eand\x26.YesNoDialogrenders HTML) and use a replacement function, so$patterns in names are not interpreted.src/webui/www_source/config/js/ic_common.js(thewebui.jspart): the direct link dialog insertssender - receiver(device addresses) for%s.src/webui/www/webui/js/lang/{de,en}/translate.lang.jsandtranslate.lang.extension.js:dialogQuestionRemoveLink,…InternalLink,…User,…SysVarand…Favoritecontain'%s', likedialogQuestionRemoveProgramalready does.Line endings and encodings are preserved. The root
www/copies are unused legacy files and are left unchanged. The pre-existingDeleteProgram()dialog ofprogramlist.htmis not part of this patch and is unchanged.Workspaces of the earlier OpenCCU patches
OpenCCU rootfs patch 0062 re-indents and rewrites the
DeleteFavoritebutton line offavOverview.htm, so it would no longer apply with zero fuzz. The OpenCCU cleanup PR will therefore add the new name encoding to thefavOverview.htmworkspaces (.origand modified files) of 0039 and 0062. After regenerating, only patch 0062 changes, in that one rewritten line; all other patches are unchanged. Until that cleanup is merged, OpenCCU must not be bumped to a Base revision containing this change.Validation
DeleteFavoriteline offavOverview.htm, whose indentation differs here (changed by hand).node --checkpasses foric_common.jsand the language files;git diff --check(withcr-at-eol) is clean.scripts/base-patch-migration.py validatewith the canonical Buildroot 2026.08git4archive of this branch (3e2e4dff, sha256ac045a0d9f713d7ceac7f4818edba5f628a7398ac9c90fd3f7527b4788d51b8b) and--skip-patch 0156, on the OpenCCU branch of fix(webui): escape the object names in the delete confirmation dialogs OpenCCU#4458 (current pinaf4539c3, equal tomain) with the refreshed workspaces described above: PASS (the other 46 rootfs patches apply with zero fuzz).comparerefuses this case because patch 0062 changes. The validation manifest (file types, modes and hashes of all 4666 entries) was therefore compared directly with a validation of the current pinaf4539c3with all 47 patches, including the fixed 0156 from fix(webui): escape the object names in the delete confirmation dialogs OpenCCU#4458: byte-identical.OpenCCU cleanup PR (removing patch 0156, refreshing the earlier workspaces and updating the pin): OpenCCU/OpenCCU#4459
Generated by Claude Code
Summary by CodeRabbit
Generated by Claude Code