Ticket #7336 (closed defect (bug): fixed)

Opened 4 years ago

Last modified 4 years ago

Links category can be set to blank

Reported by: SteveAgl Owned by: anonymous
Priority: high Milestone: 2.6.1
Component: Administration Version: 2.6
Severity: blocker Keywords: has-patch
Cc:

Description

A users signaled he was able (by mistake) to edita a link category, setting its name to nothing and saving it. Now the category show as blank in categories list without the checkbox and with any chance to change it in any way.

I tested it personally and it's true, I didn't check if post categories act in the same way.

Attachments

7336.diff Download (593 bytes) - added by scohoust 4 years ago.

Change History

Post categories aren't affected (the name is checked in wp_insert_category) but tags are. Not sure whether a fix would be possible in wp_upgrade_term or before that is called otherwise I'd have attempted one.

  • Keywords has-patch added

Patch adds in simple checking of $name in wp_update_term(). Returns WP_Error if empty.

comment:3   ryan4 years ago

  • Status changed from new to closed
  • Resolution set to fixed

(In [8393]) Don't allow empty term names. Props scohoust. fixes #7336 for trunk

comment:4   ryan4 years ago

(In [8394]) Don't allow empty term names. Props scohoust. fixes #7336 for 2.6

Note: See TracTickets for help on using tickets.