Explore the latest product updates and best practices at our hybrid Checkmk Conference #12 from June 16-18, 2026 – Register here

Werk #19684: Natural sort: handle empty strings without crashing

Component User interface
Title Natural sort: handle empty strings without crashing
Date Apr 23, 2026
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.6.0b1
Not yet released
Checkmk Community, Checkmk Pro, Checkmk Ultimate, Checkmk Cloud, Checkmk Ultimate MT
2.5.0p1
Not yet released
Checkmk Community, Checkmk Pro, Checkmk Ultimate, Checkmk Cloud, Checkmk Ultimate MT

Opening the Setup > Hosts page crashed with IndexError: string index out of range if the folder contained a host whose name was empty (for example due to a corrupted host definition). The natural-sort helper used to build the host list accessed the first character of every key unconditionally.

Empty keys are now treated as symbols (same sort bucket as keys starting with underscore), so the page renders instead of aborting.

To the list of all Werks