Jun 1st, 2005 @ 2:49 am

WP Security Update

There's an update for WordPress. Not a big deal really.

The problem though is there is a very easy fix. So easy that the Powers That Be gave very easy instructions. Totally idiot proof. Well, I'm an idiot.

1. Open the wp-includes/template-functions-category.php file in a text editor like Wordpad.
2. Go to around line 103 where it says get_the_category_by_ID.
3. Create a new line after that and paste in $cat_ID = (int) $cat_ID;

Easy, right? problem is, there are TWO get_the_category_by_ID. Which one to use??? I did a quick search of the support boards but all I could find was directions point to Matt's instructions.

So what I did was I downloaded the new version then went to look at the template-functions-category.php page and found out which one was used. But not knowing if there were any changes done my existing file, I simply pasted in the new code and uploaded the file. In other words:

  1. Downloaded new WP install.
  2. unzipped it and opened the appropriate file
  3. downloaded the same file from my site(s).
  4. used the 'new' file to find out where the change was (the first, if you do a search)
  5. screenshot of wordpad find
    (click to view larger image)

  6. found correct line and added in the appropriate code
  7. screenshot of wordpad find
    (click to view larger image)

  8. saved and uploaded my file
  9. The new line should read:

    get_the_category_by_ID($cat_ID) {
    $cat_ID = (int) $cat_ID;
    $category = &get_category($cat_ID);

    There it's done.

    UPDATE: To show the correct version at the bottom of the admin screens, open up wp-admin/version.php. Change the '1.5.1.1' to '1.5.1.2', save, upload, and yer done! The file is the same for each installation of WP. I just changed one then ftp'd it to all the WPs I run. Far too easy!

    NOTE: Please note that the underscores were removed when I saved this page. Arrgh. So, put one between each word. get(underscore)the(underscore)category(underscore). You'll see it when you do it.






No comments yet.

Post RSS feed | TrackBack URI

To leave a comment, use the form below


Your post may be held for moderation due to spam filtering. Try to not freak if it does not appear automatically. It could take a couple of minutes to several hours, depending on time of day.




Subscribe without commenting



-- Pun of the Day:
-- Copyright © 2003 - 2008, Thought Patterns | Contact Me | Blog Sitemap | Blog Help

-- PaulaOffutt.com | Site Map | Website Help

-- KG4VPY | HolyRoller.org | Southern SDs | Sumo, The Goldfish

-- Powered by WordPress version 2.2.2 in just 1.71 seconds | RSS 2.0 | Comments RSS 2.0

-- Theme is ThotRot, based on WordPress Classic | This blog contains 1689 posts for a total of 454922 words resulting in 960 comments.


Spam Karma 2 has killed 514769 comments; moderated 339 comments; and passed 1198 comments.

-- Googlebot visited this page Friday, November 14, 2008



donation logo | Green Web Hosting! This site hosted by DreamHost. | counter | 7/16/05 | Creative Commons License logo |