Latest Topics

1 Jul 28, 2006 18:02    

Can you change line 54 in admin.php to this:

if( ! $current_User || ! $current_User->check_perm( 'admin', 'any' ) )

In very rare instances, if $login_required is set to FALSE after a protected page sets it to true, the following error will occur:

Fatal error: Call to a member function check_perm() on a non-object in D:\Inetpub\wwwroot-intra\blogs\admin.php on line 54

This is a pretty unique problem, and I doubt if it will occur ever, anywhere, but better safe than sorry. This should probably be changed on any other protected pages as well.

2 Jul 29, 2006 02:13

Thanks for reporting, I've committed it.

But I have not looked at "any other protected pages".

3 Aug 05, 2006 20:17

I can't imagine why login_required would get set to false after having been true.

This is not intented to be supported. Thus it is a good thing a fatal error occurs.

Am I missing something?

4 Aug 05, 2006 20:31

I cannot really follow xangelusx example, also, but the proposed fix displays "our" "Access denied" page, instead of a fatal PHP error, which might be just a white page on a production system..

5 Aug 05, 2006 20:48

I don't care, I want the dev who does that do get a dirty error right in front of this face.

There are zillions of places where we could add test to detect if a dev did something wrong. As long as there is no security threat, there is no reason to bloat the code with worries about dev errors.

Comments are closed on this archived website.