Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#16119 closed defect (bug) (fixed)

Incorrect variable assignment in wp-admin/network/themes.php

Reported by: westi's profile westi Owned by: westi's profile westi
Milestone: 3.1 Priority: highest omg bbq
Severity: normal Version: 3.1
Component: Network Admin Keywords: has-patch commit
Focuses: multisite Cc:

Description

$_GET['disabled'] = absint( $_GET['deleted'] );
echo '<div id="message" class="updated"><p>' . sprintf( _n( 'Theme deleted.', '%s themes deleted.', $_GET['deleted'] ), number_format_i18n( $_GET['deleted'] ) ) . '</p></div>';

Should be:

$_GET['deleted'] = absint( $_GET['deleted'] );
echo '<div id="message" class="updated"><p>' . sprintf( _n( 'Theme deleted.', '%s themes deleted.', $_GET['deleted'] ), number_format_i18n( $_GET['deleted'] ) ) . '</p></div>';

Attachments (1)

16119.diff (1000 bytes) - added by westi 14 years ago.
Patch

Download all attachments as: .zip

Change History (5)

@westi
14 years ago

Patch

#1 @nacin
14 years ago

  • Keywords has-patch commit added
  • Milestone changed from Awaiting Review to 3.1
  • Priority changed from normal to highest omg bbq

Checking other spots too.

#2 @nacin
14 years ago

site-themes.php looks good. The deleted branch is only here and it's the only spot incorrect. This was mine I think, via [17130].

#3 @westi
14 years ago

(In [17230]) Ensure that we apply the absolute integer casting result to the variable we are going to use. See #16119

#4 @westi
14 years ago

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

I've looked through other absint calls like this and they all look ok.

Marking as Fixed

Note: See TracTickets for help on using tickets.