Decksters lab/palette creator - #343
Conversation
|
It was tested on Hyprland, Wayfire and MangoWM. As its listed in the actual description. Sorry. This is my first pull request ever. |
The free-form palette name is appended directly to a filesystem path and interpolated into a shell A name containing "../" can overwrite writable JSON files outside the palette directory. Shell
revertChanges and loadPaletteByName at palette-creator/panel.luau:521 reference applyPreview Forward-declare local applyPreview before these functions, then assign its implementation at the |
|
Thank you for the detailed info on what I needed to change. I'm sorry for the mistakes, but I've updated the plugin to address both the blocking and non-blocking issues: also: |
|
No worries. Code reviews are not accusation. |
Addresses review feedback from ItsLemmy:
- Blocking: saveScheme() no longer builds a path or shell command
directly from the free-form palette name field. Names are now run
through sanitizeName() (strips "/", "..", and anything outside
[A-Za-z0-9 _()-]) before touching disk. noctalia.runAsync now takes
an argv table ({"noctalia", "msg", "color-scheme-set", "custom",
name}) instead of a formatted shell string, so path traversal and
shell metacharacter injection are both closed off.
- Non-blocking: forward-declared applyPreview alongside render, so
revertChanges/loadPaletteByName (which call it before its own
definition) resolve to the local function instead of a nil global.
Reset/Load while Preview is active now actually updates the preview
instead of silently failing.
Also reworked the Load picker while testing the above: replaced the
ui.select dropdown (which had focus issues under Wayland layer-shell
popups) with an inline ui.scroll list, and added a two-step
confirm/cancel on delete so a misclick on the trash icon can't
destroy a saved palette outright.
|
We are getting there. lol. thanks. |
Plugin
decksters-lab/palette-creatorplugin.toml)What it does
External dependencies
Testing
Screenshots / Videos
Checklist
idafter the/inplugin.tomlexactly.plugin.toml,README.md,thumbnail.webp, andtranslations/en.json.README.mdfollows theREADME template, documents
every entry id and dependency, and includes exact panel IPC commands and launcher prefixes where applicable.
thumbnail.webpwith the thumbnail generator.versionfollows semver and is bumped in this PR;plugin_apiis the oldest API level this plugin requires.understand that language well enough to review and maintain it (no unreviewed machine/LLM translations).
catalog.toml; CI generates it.Code review attestation
Plugins run as trusted, unsandboxed Luau in the user's session. Confirm:
licensedeclared inplugin.toml.