Pages: [1]   Go Down
  Print  
Author Topic: Security Fix: wizards/fbanner.php  (Read 4649 times)
757jterrell
Administrator
Hero Member
*****
Offline Offline

Posts: 1637



View Profile WWW
« on: October 09, 2010, 06:18:13 PM »

With the cooperation of Scott Klarr (http://diffusionstudios.com/) we are pleased to release this security update:

This fix will stop people from uploading free featured banner credits into your site. Please also use the fix for the fbannerclick.php file.

EDIT: Link to fbannerclick.php fix is here:
http://auroraadmintraining.info/index.php/topic,1003.0.html

You will want to update the wizards/fbanners.php file, just cut and paste the entire code into your file:

Code:
<?
$producttitle="Featured Banner Ad Impressions";
//**S**//
if($action == "setfbanner") {
if($adoption1 == "newfbanner") {
if((!isset($title)) || (strlen($title) < 5)) {
$err="You must enter a valid title at least 5 letters long!";
}
else if((!isset($target)) || ($target=="") || ($target=="http://") || (substr_count($target,"http") == 0)) {
$err="You must enter a valid target URL!";
}
else if((!isset($fbanner)) || ($fbanner=="") || ($fbanner=="http://") || (substr_count($fbanner,"http") == 0)) {
$err="You must enter a valid banner URL!";
}
else if(is_html($fbanner) == true) {
$err="HTML was detected in the banner URL! You must enter only the banner image URL!";
}
else if(is_html($target) == true) {
$err="HTML was detected in the target URL! You must enter only the URL, No HTML is allowed!!";
}
else if(is_ad_blocked($target)) {
$err="Ad blocked was returned. Please contact support!";
}
else {
$sql=$Db1->query("INSERT INTO fbanners SET
username='$username',
title='".addslashes($title)."',
target='".addslashes($target)."',
banner='".addslashes($fbanner)."',
dsub='".time()."',
credits='0',
pref='$order[order_id]'
");
$sql=$Db1->query("SELECT * FROM fbanners WHERE pref='$order[order_id]' ORDER BY id DESC LIMIT 1");
$pad=$Db1->fetch_array($sql);
}
}
else if($adoption1 == "exsistfbanner") {
$exsistfbanner = mysql_real_escape_string($_POST['exsistfbanner']);
$sql=$Db1->query("SELECT * FROM fbanners WHERE id='$exsistfbanner'");
$pad=$Db1->fetch_array($sql);
}
if(!isset($err)) {
$sql=$Db1->query("UPDATE orders SET
ad_id='$pad[id]'
WHERE order_id='$order[order_id]'
");
$Db1->sql_close();
header("Location: index.php?view=account&ac=buywizard&step=3".iif($samount, "&samount=$samount")."&pid=$order[order_id]&".$url_variables."");
}
}

$sql=$Db1->query("SELECT * FROM fbanners WHERE username='$username' ORDER BY title");
$currenfbanners=$Db1->num_rows();
while($temp=$Db1->fetch_array($sql)) {
$fbannerlist.="<option value=\"$temp[id]\">$temp[title]\n";
}

$includes[content]="
".iif(isset($err),"<script>alert('$err');</script>")."
<div align=\"center\">

<a href=\"index.php?view=account&ac=buywizard&step=2&ptype=fbannerc&".$url_variables."\">Click Here To Order Account Credits Only</a>
<br />Or<br />


<form action=\"index.php?view=account&ac=buywizard&pid=$order[order_id]&step=2".iif($samount, "&samount=$samount")."&action=setfbanner&".$url_variables."\" method=\"post\">
<table>
".iif($currenfbanners>0,"
<tr>
<td valign=\"top\"><input id=\"exsistfbanner\" type=\"radio\" name=\"adoption1\" value=\"exsistfbanner\"".iif($adoption1 != "newfbanner"," checked=\"checked\"")."></td>
<td>
<strong><label for=\"exsistfbanner\">Extend Exsisting Featured Banner Ad</label></strong><br />
<select name=\"exsistfbanner\">
$fbannerlist
</select>
</td>
</tr>
<tr>
<td height=10></td>
</tr>
")."
<tr>
<td valign=\"top\"><input id=\"newfbanner\" type=\"radio\" name=\"adoption1\" value=\"newfbanner\"".iif(($currenfbanners==0) || ($adoption1 == "newfbanner")," checked=\"checked\"")."></td>
<td>
<strong><label for=\"newfbanner\">Create A New Featured Banner Ad</label></strong><br />
<table>
<tr>
<td>Title: </td>
<td><input type=\"text\" name=\"title\" value=\"".htmlentities(stripslashes($title))."\"></td>
</tr>
<tr>
<td>Target Url: </td>
<td><input type=\"text\" name=\"target\" value=\"".htmlentities(stripslashes($target))."\"></td>
</tr>
<tr>
<td>Banner Location Url: </td>
<td><input type=\"text\" name=\"fbanner\" value=\"".htmlentities(stripslashes($fbanner))."\"></td>
</tr>
</table>
<div align=\"center\"><small>URL's must include <strong>http://</strong></small></div>
</td>
</tr>
<tr>
<td height=10></td>
</tr>
<tr>
<td colspan=2 align=\"right\"><input type=\"submit\" value=\"Next Step =>\"></td>
</tr>
</table>
</form>
</div>
";
//**E**//
?>
« Last Edit: November 03, 2010, 10:50:21 PM by 757jterrell » Logged

Upgrade to an SDR 3
Addons
Full Member
***
Offline Offline

Posts: 158


View Profile
« Reply #1 on: October 13, 2010, 05:32:42 PM »

updated
Logged

bwbrown
Newbie
*
Offline Offline

Posts: 19


View Profile
« Reply #2 on: November 02, 2010, 05:25:02 PM »

please clarify what code and where o put it in the fbannerclick.php file

replace the whole file with this code?
Logged
cARRIE
Administrator
Hero Member
*****
Offline Offline

Posts: 1458



View Profile WWW
« Reply #3 on: November 02, 2010, 08:04:37 PM »

Yes, replace the whole file or code.
Logged

RegeniaStone
Newbie
*
Offline Offline

Posts: 3


View Profile
« Reply #4 on: October 18, 2011, 01:49:46 AM »

I also have the same problem, waiting for the answer, thanks!!




---------------------
the x files seasons 1-9
tales from the crypt Seasons 1-7
Logged
bprasetio
Global Moderator
Hero Member
*****
Offline Offline

Posts: 834


View Profile
« Reply #5 on: October 18, 2011, 02:04:12 AM »

so whats your problem related with this security fix and what the answer you are expected...?
 
Logged

Presenting MyGPT Group:

[WTS] Task Summary Addon
Bogdannn
Newbie
*
Offline Offline

Posts: 32


View Profile
« Reply #6 on: March 06, 2012, 04:58:36 PM »

Do i need to go manually and change all this things? or its included in sdr2 and sdr3 now?
Logged
bprasetio
Global Moderator
Hero Member
*****
Offline Offline

Posts: 834


View Profile
« Reply #7 on: March 06, 2012, 09:12:20 PM »

Its supposed to SDR2 if I am not mistaken..
Logged

Presenting MyGPT Group:

[WTS] Task Summary Addon
Get a SDR 3 NOW at http://ptcfactory.info

The best and most up to date Aurora script in the market!!
Pages: [1]   Go Up
  Print  
 
Jump to: