Werk #19684 · Apr 23, 26
Natural sort: handle empty strings without crashing
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.
Details
- Class:
- Bug Fixes
- Level:
- Trivial
- Component:
- Multisite
- Versions:
- 3.0.0b1Not yet releasedAll Editions
- 2.5.0p1All Editions