1
amudee
zmagazine 1.0 Print.PHP SQL Injection Vulnerability
  • 2009/1/4 19:45

  • amudee

  • Just popping in

  • Posts: 42

  • Since: 2007/8/8 1


Someone has recently exploited my website's zmagazine module, possibly using Print.PHP SQL Injection Vulnerability.

Is there any fix to this problem ?

So far i could not find any solution.

best regards,
amudee

2
trabis
Re: zmagazine 1.0 Print.PHP SQL Injection Vulnerability
  • 2009/1/4 21:19

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


in print.php use this instead:

PrintPage(intval($articleid));


3
Anonymous
Re: zmagazine 1.0 Print.PHP SQL Injection Vulnerability
  • 2009/1/4 21:41

  • Anonymous

  • Posts: 0

  • Since:


Edit zmagazine/print.php and replace:
foreach ($HTTP_POST_VARS as $k => $v
{
    ${
$k} = $v;
}

foreach (
$HTTP_GET_VARS as $k => $v
{
    ${
$k} = $v;
}

if ( empty(
$articleid) ) {
        
redirect_header("index.php");
}

with:
if ( isset($_GET['articleid']) ) 
{
    
$articleid intval$_GET['articleid'] );
}
else
{
    
redirect_header("index.php");
}


and replace:
PrintPage($articleid);

at the end of file with:
include_once XOOPS_ROOT_PATH '/modules/' $xoopsModule->dirname() .'/include/groupaccess.php';
$article = new WfsArticle($articleid);
if (
checkAccess($article->groupid)) 
{    
PrintPage(intval($articleid));}
else
{    
redirect_header("index.php"2_NOPERM);
    exit();
}



This modification is based on xfsection module and trabis note.

Login

Who's Online

243 user(s) are online (174 user(s) are browsing Support Forums)


Members: 0


Guests: 243


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits