Skip to content

etc_requests: whitespace-only release name stores an empty-named entry #47

Description

@Aybook

Found while scoping luadch #453 (util.trimstring hardening).

In etc_requests handle_releases, a release-name command whose argument is only whitespace (e.g. +request add followed by trailing spaces) passes the dispatch gate param ~= "" (the arg is " ", non-empty), then util.trimstring( " " ) returns "", and the add branch stores a release with an empty name (v[1] == "").

Pre-existing and marginal (most chat clients strip trailing whitespace), and independent of #453 - trimstring( " " ) returns "" in both the old and hardened luadch. Low priority.

Fix: guard in handle_releases after trim - if the trimmed release name is empty, show the help instead of storing / looking up an empty name. Covers add / fill / del (show ignores the argument; delold validates its numeric age itself). Reuse the existing msg_chat_help_op + msg_help_01..18 reply pattern (no new lang key). Bump scriptversion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions