Better duration string validation in /ban command #4

Closed
opened 2026-02-25 08:59:25 +01:00 by tkuraczyk · 3 comments
tkuraczyk commented 2026-02-25 08:59:25 +01:00 (Migrated from gitlab.kuraczyk.net)

I suggest using regex instead of current safety measures.

Expression like ^\d+:(s|m|h|d)$ should do the job. Ofc we need also one which validates only numbers.

I suggest using regex instead of current safety measures. Expression like `^\d+:(s|m|h|d)$` should do the job. Ofc we need also one which validates only numbers.
tkuraczyk commented 2026-02-25 08:59:26 +01:00 (Migrated from gitlab.kuraczyk.net)

changed due date to February 25, 2026

changed due date to February 25, 2026
tkuraczyk commented 2026-02-25 08:59:26 +01:00 (Migrated from gitlab.kuraczyk.net)

assigned to @tkuraczyk

assigned to @tkuraczyk
tkuraczyk commented 2026-02-25 17:52:35 +01:00 (Migrated from gitlab.kuraczyk.net)

mentioned in commit f60e280bad

mentioned in commit f60e280bad77bdfc1fb66bea5501162542738af1
tkuraczyk (Migrated from gitlab.kuraczyk.net) closed this issue 2026-02-25 17:53:16 +01:00
Sign in to join this conversation.
No labels
Urgent
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: tkuraczyk/BanHammer#4
No description provided.