Author |
Message |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Sat Oct 11, 2003 12:33 pm |
  |
I've just written and implemented our new admin.php security hole patch. I've tested it and it seems to work, so I'm having my staff continue testing. If all goes well I'll release it tomorrow. So consider this a heads up! |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
poppafrog
Lieutenant


Joined: Jul 14, 2003
Posts: 153
|
Posted:
Sat Oct 11, 2003 12:45 pm |
  |
Thanks ZX for the heads up and hard work you always put in for us. |
_________________
 |
|
    |
 |
chatserv
General


Joined: Jan 12, 2003
Posts: 3128
Location: Puerto Rico
|
Posted:
Sun Oct 12, 2003 7:42 pm |
  |
The code posted in the frontpage article is incorrect because of Nuke's filtering so it's best if it's placed here.
Code: |
$checkmyurl = getenv("REQUEST_URI");
if (preg_match("/\?admin/", "$checkmyurl")) {
echo "die - see nukecops.com";
exit;
} |
|
_________________ Feed a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
ScriptHeaven | NukeResources
Last edited by chatserv on Mon Oct 13, 2003 6:08 am; edited 1 time in total |
|
    |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Sun Oct 12, 2003 7:49 pm |
  |
Thanks for saving my butt there CS. Yes, the PHP-Nuke news filtering does filter out required characters. |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
tinjaw
Nuke Cadet


Joined: Oct 12, 2003
Posts: 4
|
Posted:
Sun Oct 12, 2003 8:04 pm |
  |
I added the code and now I can't add a new block with a RSS feed. It complains about the URL. Can somebody sanity check this for me? I'll post more details if nobody can reproduce the error by default.
--------------
There is a problem with the RSS file URL
Please check the URL and RSS file name, then try again.
-------------------- |
|
|
   |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Sun Oct 12, 2003 8:08 pm |
  |
Hi'ya sanity check has been completed on several PHP-Nuke websites and all has been fine. Please insert the code into your admin.php. Otherwise, please post exactly where you placed it in your code. |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
speedx
Corporal


Joined: Oct 01, 2003
Posts: 59
|
Posted:
Sun Oct 12, 2003 8:13 pm |
  |
So does it go like this?
<?php
$url = getenv("REQUEST_URI");
if (preg_match("/\?admin/", "$url")) {
echo "die";
exit;
}
require_once("mainfile.php");
get_lang(admin); |
|
|
   |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Sun Oct 12, 2003 8:17 pm |
  |
Yes that is correct. |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
speedx
Corporal


Joined: Oct 01, 2003
Posts: 59
|
Posted:
Sun Oct 12, 2003 8:18 pm |
  |
Ok just making sure.. site seems to be ok with that code in there.. |
|
|
   |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Sun Oct 12, 2003 8:19 pm |
  |
Yes it will be good with that code. |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
tinjaw
Nuke Cadet


Joined: Oct 12, 2003
Posts: 4
|
Posted:
Sun Oct 12, 2003 8:20 pm |
  |
chatserv pegged it. That's the bugger. |
|
|
   |
 |
speedx
Corporal


Joined: Oct 01, 2003
Posts: 59
|
Posted:
Sun Oct 12, 2003 8:24 pm |
  |
tinjaw thats only if you are using rss correct? use the code chatserv posted? |
|
|
   |
 |
Johan1982
Nuke Soldier


Joined: Oct 13, 2003
Posts: 22
|
Posted:
Sun Oct 12, 2003 8:28 pm |
  |
|
   |
 |
tinjaw
Nuke Cadet


Joined: Oct 12, 2003
Posts: 4
|
Posted:
Sun Oct 12, 2003 8:29 pm |
  |
speedx: If you attempt to add a block and that block is a custom block based on a RSS feed, the code that checks the URL also uses the $URL variable. This causes a conflict. Therefore the security fix needs to use a variable named something other than $URL to be backward compatible. |
|
|
   |
 |
speedx
Corporal


Joined: Oct 01, 2003
Posts: 59
|
Posted:
Sun Oct 12, 2003 8:31 pm |
  |
|
   |
 |
|