Error messages when I try to view past the first page
 
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.   printer-friendly view    phpMiX.org Forum Index -> mxBB Modules -> mxBB Module: mx_errordocs
View previous topic :: View next topic  
Author Message
cryptoknight
Apprentice
Apprentice


Joined: 18 Sep 2004
Posts: 16

PostPosted: Thu Jun 15, 2006 8:46 pm    Post subject: Error messages when I try to view past the first page Reply with quote

PHPBB: 2.0.21
MX: 2.7.6 pl2
Php: 4.4.2
MySQL: 4.1.19

When in the ACP I click on the Log Management to get a list of errors for the past 7 days.

When I click on the drop down to set it to the past 2 weeks, I get the following error:

Code:

Warning: parse_url(/http://www.steeldominion.com/admin/index.php?sid=e0c1bb603da085f09773b01e451be201): Unable to parse url in /home/cryptok/public_html/modules/mx_errordocs/includes/common.php on line 162

Warning: parse_url(/http://www.steeldominion.com/admin/index.php?sid=e0c1bb603da085f09773b01e451be201): Unable to parse url in /home/cryptok/public_html/modules/mx_errordocs/includes/common.php on line 162
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Fri Jun 16, 2006 5:48 pm    Post subject: Reply with quote

Hi crypto! Smile ...and sorry for the delay

Yep, you have just a found a nice bug. Please, try this:

OPEN: mx_errordocs/includes/common.php

FIND:
Code:
$this->request_uri = $HTTP_SERVER_VARS['REQUEST_URI'];


REPLACE WITH:
Code:
$this->request_uri = $HTTP_SERVER_VARS['SCRIPT_URI'];


Is it possible that there has been some changes in your PHP version or settings?

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
cryptoknight
Apprentice
Apprentice


Joined: 18 Sep 2004
Posts: 16

PostPosted: Fri Jun 16, 2006 8:12 pm    Post subject: Reply with quote

Put in the change, now I get a 404 error when I try to view anything but the default log view.
Code:

The server has not found any resources matching the Request-URI. This condition may be temporary. You may try again later.
The address you entered or link you followed may have been mistyped. You may try retyping the address.
 
You were referred from http://www.steeldominion.com/modules/mx_errordocs/admin/admin_errordocs_log.php?sid=7579c0160f7a205bb1aef80794b335fe
 


Nothing has changed that I'm aware of... I just don't think I tried to view more than the first page of errors before (nowadays I have to dig through them to look for the latest attacks... sigh).
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Fri Jun 16, 2006 8:47 pm    Post subject: Reply with quote

Oh, I do not have a test enviroment for mxBB, I can just look at the code.

The error is happening in line 162 of mx_errordocs/includes/common.php which looks like this:
Code:
$uri = parse_url($this->request_uri);   // line 162
$fiext = end(explode('.', $uri['path']));

Here we try to extract the extenssion of the requested URI. Maybe doing something more simple?
Code:
$fiext = end(explode('.', $this->request_uri));

This is, I believe, the first module I wrote for mxBB, a long time ago...

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
cryptoknight
Apprentice
Apprentice


Joined: 18 Sep 2004
Posts: 16

PostPosted: Fri Jun 16, 2006 9:00 pm    Post subject: Reply with quote

Same error... and yes line 162 (which I'm getting familiar with staring at) is where the problem occurs. Or was before I put in the first code change above... now I just get the 404 error.

Could this have something to do with the various new acp related security features of phpbb?
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Fri Jun 16, 2006 9:15 pm    Post subject: Reply with quote

Maybe related to the double authentication check? ...or the checks for SIDs passed along all ACP URLs... I've been checking and it seems append_sid is used everywhere it should.

Could you please try restoring what we did at first, until you get the original error and then try my latest fix?

Otherwise, I would have to find some time to install a test environment. I'm afraid.

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
cryptoknight
Apprentice
Apprentice


Joined: 18 Sep 2004
Posts: 16

PostPosted: Fri Jun 16, 2006 9:44 pm    Post subject: Reply with quote

Ok reversed the first fix (SCRIPT_URI replaced with REQUEST_URI).

Put in second fix.

Now I get a 404 error.
 
Back to top
View user's profile Send private message
cryptoknight
Apprentice
Apprentice


Joined: 18 Sep 2004
Posts: 16

PostPosted: Fri Jun 16, 2006 9:45 pm    Post subject: Reply with quote

And if you'd prefer... I can give you whatever access you need to my site, I've known you for quite a while... I think I can trust you. 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Sat Jun 17, 2006 11:31 am    Post subject: Reply with quote

Thanks for the confidence. PM me the details if you wish and I'll take a look. I believe I just need a user with access to your ACP. I'll PM you the IP I used to connect so you can monitor whatever I do if that helps you feel more confortable Wink

It is strange that it suddenly started to fail...

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Mon Jun 19, 2006 9:45 am    Post subject: Reply with quote

ok, I got your PM. Thanks for your confidence.

I believe I got it. There are a couple of URLs that are passed to javascript (U_THIS and U_DELETE_ALL) which are built using non-HTML ampersands (&). However, append_sid is also used and here is where phpBB is appending the sid using HTML ampersands (&). I believe this is the reason of those 404 errors (javascript doesn't understand & as argument separators).

Could you please try the following?

OPEN: mx_errordocs/admin/admin_errordocs_log.php

FIND:
Code:
'U_THIS' => append_sid($this_href),


REPLACE WITH:
Code:
'U_THIS' => append_sid($this_href, TRUE),


FIND:
Code:
'U_DELETE_ALL' => append_sid($this_href.'&mode=delall'),


REPLACE WITH:
Code:
'U_DELETE_ALL' => append_sid($this_href.'&mode=delall', TRUE),

That is, we can use the second argument of append_sid to tell phpBB to use non-HTML ampersands (&) to append the sid argument.

There might be something else, but this is for sure a bug that needs to be fixed.

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.   printer-friendly view    phpMiX.org Forum Index -> mxBB Modules -> mxBB Module: mx_errordocs All times are GMT + 1 Hour
 
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum