WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#7336 closed defect (bug) (fixed)

Links category can be set to blank

Reported by: SteveAgl Owned by:
Milestone: 2.6.1 Priority: high
Severity: blocker Version: 2.6
Component: Administration Keywords: has-patch
Focuses: 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 (1)

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

Download all attachments as: .zip

Change History (5)

comment:1 Scott H6 years ago

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.

scohoust6 years ago

comment:2 scohoust6 years ago

  • Keywords has-patch added

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

comment:3 ryan6 years ago

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

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

comment:4 ryan6 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.