Skip to content

Commit 01ccfbb

Browse files
author
Joel Wan
committed
fixed bug introduced by removal of evals; removed evals on home page
1 parent a9a0ea5 commit 01ccfbb

File tree

4 files changed

+17
-27
lines changed

4 files changed

+17
-27
lines changed

index.php

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@
2424
}
2525
if ($misc->GetVariable('attributeList') != null)
2626
{
27-
if (isset($_GET['attributeList']))
28-
$attributeList = stripcslashes(urldecode($_GET['attributeList']));
27+
if (isset($_GET['attributeList'])) {
28+
$attArray = stripcslashes(urldecode($_GET['attributeList']));
29+
$attArray = trim(preg_replace('#^array\s*\(|\d\s\=\>\s*\'|\'\,\s*\)$#', '', $attArray));
30+
$attributeList = preg_split('#\'\s*,\s*#', $attArray);
31+
}
2932
else
3033
@$attributeList=unserialize($_SESSION['attributeList']);
3134
}
@@ -41,7 +44,9 @@
4144
{
4245
$typeList = urldecode($_GET['typeList']);
4346
}
44-
$typeList = trim($typeList);
47+
$typeArray = trim($typeList);
48+
$typeArray = trim(preg_replace('#^array\s*\(|\d\s\=\>\s*\'|\'\,\s*\)$#', '', $typeArray));
49+
$typeList = preg_split('#\'\s*,\s*#', $typeArray);
4550
for($i=0; $i<sizeof($typeList); $i++)
4651
{
4752
$typeList[$i] = stripcslashes($typeList[$i]);
@@ -59,9 +64,15 @@
5964
if ($misc->GetVariable('classList') != null)
6065
{
6166
if (isset($_GET['classList']))
62-
$classList = stripcslashes(urldecode($_GET['classList']));
67+
{
68+
$classArray = stripcslashes(urldecode($_GET['classList']));
69+
$classArray = trim(preg_replace('#^array\s*\(|\d\s\=\>\s*\'|\'\,\s*\)$#', '', $classArray));
70+
$classList = preg_split('#\'\s*,\s*#', $classArray);
71+
}
6372
else
73+
{
6474
@$classList=unserialize($_SESSION['classList']);
75+
}
6576
}
6677

6778
$pdoDriver = ($misc->GetVariable('pdoDriver')!=null?$misc->GetVariable('pdoDriver'):'mysql');

local_46888.xml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,10 @@
11
<?xml version="1.0" ?>
22
<Links>
3-
<Link>
4-
<LinkID>OI87827</LinkID>
5-
<URL>http://www.forumla.de/archive/index.php/f-30.html</URL>
6-
<Text>PS3 Community - Forumla.de</Text>
7-
<BeforeText> </BeforeText>
8-
<AfterText> </AfterText>
9-
</Link>
10-
<Link>
11-
<LinkID>OI319561</LinkID>
12-
<URL>http://www.superwarehouse.com/Sony_Laptops/b/250/c/14</URL>
13-
<Text>Sony Laptops</Text>
14-
<BeforeText> </BeforeText>
15-
<AfterText> </AfterText>
16-
</Link>
173
<Link>
184
<LinkID>OI469063</LinkID>
195
<URL>http://www.canadianwebhosting.com/domain_hosting.asp</URL>
206
<Text>domain hosting</Text>
217
<BeforeText> </BeforeText>
228
<AfterText> </AfterText>
239
</Link>
24-
<Link>
25-
<LinkID>OI576934</LinkID>
26-
<URL>http://www.facebook.com/FisherInvestmentsMarketMinder</URL>
27-
<Text>Market Minder on Facebook</Text>
28-
<BeforeText> </BeforeText>
29-
<AfterText> </AfterText>
30-
</Link>
3110
</Links>

regenerate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
}
5858
else
5959
{
60-
$_SESSION[$arguments[0]] = $value;
60+
eval ("\$_SESSION['".$arguments[0]."'] = '".$value."';");
6161
}
6262
}
6363
if (!isset($pdoDrive))

services/soap_php5.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ function GeneratePackageFromLink($link)
289289
}
290290
else
291291
{
292-
$$arguments[0] = $value;
292+
eval ("$".$arguments[0]." = '".$value."';");
293293
}
294294
if (!isset($pdoDrive))
295295
{

0 commit comments

Comments
 (0)