You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 30 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - FIX*NCB-you are not authorised to administer this board [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
D1ab70
Nuke Soldier
Nuke Soldier


Joined: Jul 18, 2003
Posts: 14


PostPosted: Sun Nov 09, 2003 8:51 pm Reply with quoteBack to top

I believe I found a fix for a bug in the nc bundle when your logged in as admin and you go to the forums admin page you get an error stating " your not authorised to administer this board " .I found this fix accidently actually,What I did was is I typed your not authorised to administer this board in google and one search brought me to the nuke cvs page for pagestart.php http://cvs.nukecops.com/co.php/modules/Forums/admin/pagestart.php?r=1.3 .I noticed a message die contained this error so I Investaged and searched for differences in coding.There was a few versions of it so i took the 1.2 version and uploaded it to .\modules\forums\admin\ directory.I click to admin the forums and it worked.I went back to the cvs page for pagestart.php and did a diff w/ 1.2 and 1.3 http://cvs.nukecops.com/diff.php/modules/Forums/admin/pagestart.php?r1=1.2&r2=1.3&ty=h .Apparently the 1.3 update was a security patch and in the coding there was a noticable difference that seemed like a mistake.

The 1.2 version around line 77 had ....

if ($radminsuper == 1 OR $radminforum == 1) {

The 1.3 version had ....

if ($radminsuper != 1 OR $radminforum != 1) {

The difference is that after if ($radminsuper in 1.2 had == as well as OR $radminforum .in 1.3 version instead of == it had != .

To fix.... take the 1.3 version replace ! with = .save ->upload to [root]\modules\Forums\admin\
.go to admin->forums and it should work.

I saw alot of people had this problem and wasnt using the nc bundle rather the 6.0 w/ bbtonuke mod.Whoever has this problem and doesnt have nc bundle and is using a different nuke version and this fix helps please reply and state the nuke version you use, so that it helps others decide if this fix is for them.

Also another fix is just take the 1.2 file from cvs and upload.Yes that works too but since 1.3 was a security update I dont recommend doing this as this may defeat the update purpose and can be a threat to your boards security.

If possible can an admin clarify about the ! instead of = and was it a mistake or it was there on purpose?
Find all posts by D1ab70View user's profileSend private message
gr82meetu78
Nuke Soldier
Nuke Soldier


Joined: Nov 09, 2003
Posts: 16


PostPosted: Sun Nov 09, 2003 9:11 pm Reply with quoteBack to top

I'm not the admin, but that is/was a serious friggin logic error.

== meansTHIS IS EQUAL TO THAT
!= means THIS IS NOT EQUAL TO THAT

so a statement like
if(a==b){
echo "a and b are the same";
}elseif(a != b){
echo "a and b are different";
}

Also be careful with OR, in a comparison statement it is very rare to use literal OR you should use || instead. Whoever is placing OR all over the place in this code is just praying for a break in the future when PHP abandons trying to be perl compatible.
OR isn't really considered best practice anymore.

Thank you D1ab70 for the fix, to be honest I would never have caught it.
The statment is just evaluating whether a person has permission to admin the board.

$radminsuper is a flag that is set if you are the site admin (superuser)
$radminforum is a flag that is set if you are a forum admin
They evaluate as follows

1=TRUE
0=FALSE

So assuming the line in question contains a die statement it probably looks something like this

if ($radminsuper == 1 OR $radminforum == 1) {
die_message("You are not authorized");
}

When in fact it should have read
if($radminsuper != 1 || $radminforum !=1){
die_message("You are niether a site admin nor are you a forum admin");
}

Well I'm off to find this piece of screwup in my own site now, since I have been locked out for over 24 hours, with no luck at finding the problem Smile
Find all posts by gr82meetu78View user's profileSend private messageVisit poster's website
gr82meetu78
Nuke Soldier
Nuke Soldier


Joined: Nov 09, 2003
Posts: 16


PostPosted: Sun Nov 09, 2003 9:27 pm Reply with quoteBack to top

Hey there was something for you I forgot
I just got to looking at the code in the page you mentioned.
Here is the fix in it's entirety

extract($row);
if ($radminsuper != 1 && $radminforum != 1) {
message_die(GENERAL_MESSAGE, "You are not authorised to administer this board");
}

The extract is needed because $radminsuper and $radminforum remained undefined otherwise.
Man who is doing QC for the code around these parts lately?
Find all posts by gr82meetu78View user's profileSend private messageVisit poster's website
IACOJ
Major
Major


Joined: Jan 15, 2003
Posts: 1269

Location: USA

PostPosted: Fri Nov 14, 2003 11:21 am Reply with quoteBack to top

Please download the security patch released today. There is a link to it from the news article on the front page.

_________________
http://castlecops.com
<b>Microsoft MVP Windows-Security 2005</b> <img src="http://castlecops.com/zx/Paul/mvp.gif">
Find all posts by IACOJView user's profileSend private message
Zhen-Xjell
Nuke Cops Founder
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939


PostPosted: Fri Nov 14, 2003 9:36 pm Reply with quoteBack to top

Hi the last update to the bundle end of october caused some issues. We cannot locate the developer however we fixed the bundle to working order again.

_________________
Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki]
Find all posts by Zhen-XjellView user's profileSend private messageSend e-mailVisit poster's website
D1ab70
Nuke Soldier
Nuke Soldier


Joined: Jul 18, 2003
Posts: 14


PostPosted: Mon Nov 17, 2003 2:09 pm Reply with quoteBack to top

sorry, gr82meetu78 for not getting back right away ive been away for a while but it seems a new security patch iacoj just posted.im gonna try that fix and revert the file and see if it works.thanks zx for fixing the bundle while chatserv has been out.
Find all posts by D1ab70View user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.196 Seconds - 306 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::