takuhii
New Member
- Messages
- 344
- Reaction score
- 0
- Points
- 0
Guys,
I have found some issues with Wordpress, that are nothing to do with server config etc... Read on
I just install wordpress 2.2.1 this morning. But I found an error when I try to delete posts in my blog. I get the dreaded "You do not have permission to do this" error. I searched thru Internet and finally found a solution that solved the problem for wordpress 2.1. I tried out the solution with wordpress 2.2.1 and I found it also work in wordpress 2.2.1. The only difference is the code change is not as mentioned in solution for wordpress 2.1. IF YOU PERFORM THIS CHANGE ON 2.2.1 IN THE WRONG LOCATION YOU WILL GET LOCKED OUT OF YOUR WORDPRESS ADMIN PANEL!!!
In wordpress 2.1, you have to replaced lines 244 through 250 of wp-includes/pluggable as below :$cookie = explode('; ', urldecode(empty($_POST['cookie']) ? $_GET['cookie'] : $_POST['cookie'])); // AJAX scripts must pass cookie=document.cookie
foreach ( $cookie as $tasty ) {
if ( false !== strpos($tasty, USER_COOKIE) )
$user = substr(strstr($tasty, '='), 1);
if ( false !== strpos($tasty, PASS_COOKIE) )
$pass = substr(strstr($tasty, '='), 1); }with
$user = $_COOKIE[USER_COOKIE];
$pass = $_COOKIE[PASS_COOKIE];
but in wordpress 2.2.1, you have to replace lines 296 through 302 (or there-about, look for the $cookie = explode line) of wp-includes/pluggable.php instead of lines 244 through 250
with
$user = $_COOKIE[USER_COOKIE];
$pass = $_COOKIE[PASS_COOKIE];
It seems the wordpress developers are aware of the problem, but don't seem to want to fix it, as this problem seems to have been around since Wordpress 1.5.
If anyone wants me to fix there Wordpress install, give me a shout, as I've managed to get mine working again... If anyone can confirm that pluggable.php is a universal file (ie. not specific to my server), I will publish the fixed code as an attachment to this post...
I've had a quick glance over the pluggable.php file and it seems pretty harmless.
Attached to this post is the FIXED pluggable.php for WordPress 2.2.1. PLEASE PLEASE PLEASE backup your original BEFORE you use this file, as I cannot be held responsible for any issues that may arise. You use this file at your own risk.
I have found some issues with Wordpress, that are nothing to do with server config etc... Read on
I just install wordpress 2.2.1 this morning. But I found an error when I try to delete posts in my blog. I get the dreaded "You do not have permission to do this" error. I searched thru Internet and finally found a solution that solved the problem for wordpress 2.1. I tried out the solution with wordpress 2.2.1 and I found it also work in wordpress 2.2.1. The only difference is the code change is not as mentioned in solution for wordpress 2.1. IF YOU PERFORM THIS CHANGE ON 2.2.1 IN THE WRONG LOCATION YOU WILL GET LOCKED OUT OF YOUR WORDPRESS ADMIN PANEL!!!
In wordpress 2.1, you have to replaced lines 244 through 250 of wp-includes/pluggable as below :$cookie = explode('; ', urldecode(empty($_POST['cookie']) ? $_GET['cookie'] : $_POST['cookie'])); // AJAX scripts must pass cookie=document.cookie
foreach ( $cookie as $tasty ) {
if ( false !== strpos($tasty, USER_COOKIE) )
$user = substr(strstr($tasty, '='), 1);
if ( false !== strpos($tasty, PASS_COOKIE) )
$pass = substr(strstr($tasty, '='), 1); }with
$user = $_COOKIE[USER_COOKIE];
$pass = $_COOKIE[PASS_COOKIE];
but in wordpress 2.2.1, you have to replace lines 296 through 302 (or there-about, look for the $cookie = explode line) of wp-includes/pluggable.php instead of lines 244 through 250
with
$user = $_COOKIE[USER_COOKIE];
$pass = $_COOKIE[PASS_COOKIE];
It seems the wordpress developers are aware of the problem, but don't seem to want to fix it, as this problem seems to have been around since Wordpress 1.5.
If anyone wants me to fix there Wordpress install, give me a shout, as I've managed to get mine working again... If anyone can confirm that pluggable.php is a universal file (ie. not specific to my server), I will publish the fixed code as an attachment to this post...
I've had a quick glance over the pluggable.php file and it seems pretty harmless.
Attached to this post is the FIXED pluggable.php for WordPress 2.2.1. PLEASE PLEASE PLEASE backup your original BEFORE you use this file, as I cannot be held responsible for any issues that may arise. You use this file at your own risk.
Attachments
Last edited by a moderator: