PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
VinDSL
Life Cycles Becoming CPU Cycles


Joined: Jul 11, 2004
Posts: 616
Location: Arizona (USA) Admin: NukeCops.com Admin: Disipal Designs Admin: Lenon.com

PostPosted: Fri Jul 29, 2005 6:52 pm Reply with quote Back to top

You may have seen this 'fix' on NukeResources:
Only registered users can see links on this board!
Get registered or login to the forums!
. It's a nice one!
Here's how to make it work with PHP-Nuke 6.5 (basically a copy 'n' paste with some notes added and a file change...) Wink

open auth.php (not includes/auth.php)

FIND:
Code:
  $result2 = $db->sql_query("SELECT pwd FROM ".$prefix."_authors WHERE aid='$aid'");


CHANGE TO:
Code:
  //Query added. Used for fix in 'admin.php'&'mainfile.php'.
  //Fix by Quake
  $result2 = $db->sql_query("SELECT name, pwd FROM ".$prefix."_authors WHERE aid='$aid'");



open admin.php

FIND:
Code:
if(!isset($op)) { $op = "adminMain"; }


AFTER ADD:
Code:
//Only 'god' user can 'Edit Admins' in 'Administration Menu' now.
//Fix by Quake & Chatserv
if(isset($op) AND ($op=="mod_authors" OR $op=="modifyadmin" OR $op=="UpdateAuthor" OR $op=="AddAuthor" OR $op=="deladmin2" OR $op=="deladmin" OR $op=="assignstories" OR $op=="deladminconf") AND ($row2['name'] != "God")) {
    die("Illegal Operation");
}



open mainfile.php

FIND:
Code:
 foreach ($_POST as $secvalue) {
    if ((eregi("<[^>]*onmouseover*\"?[^>]*>", $secvalue)) || (eregi("<[^>]script*\"?[^>]*>", $secvalue)) || (eregi("<[^>]*body*\"?[^>]*>", $secvalue)) || (eregi("<[^>]style*\"?[^>]*>", $secvalue))) {
      die ($htmltags);
    }
  }
}



AFTER ADD:
Code:
//Posting from other servers not allowed now.
//Bug found by PeNdEjO
//Fix by Quake
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (strlen($_SERVER["HTTP_REFERER"]) > 0) {
if (!ereg("(http://$_SERVER[HTTP_HOST])", $_SERVER["HTTP_REFERER"]) && !ereg("(https://$_SERVER[HTTP_HOST])", $_SERVER["HTTP_REFERER"])) {
    die('Posting from another server not allowed!');
  }
 }
}
View user's profile Send private message Visit poster's website ICQ Number
sting
Involved
Involved


Joined: Sep 23, 2003
Posts: 460
Location: Somewhere out there...

PostPosted: Tue Aug 02, 2005 8:20 am Reply with quote Back to top

Nice.... Thanks Vin

-sting
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous 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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum