1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-07 23:26:41 +02:00

Fixes #1712- Theme download with suhosin active fixed. Plugin auto-install after download fixed.

This commit is contained in:
Cameron
2016-11-21 15:17:12 -08:00
parent 45084b2de7
commit e8d976fa2d
3 changed files with 24 additions and 4 deletions

View File

@@ -718,6 +718,7 @@ class pluginManager{
if($mp->download($data['plugin_id'], $data['plugin_mode'], 'plugin'))
{
$this -> pluginCheck(true); // rescan the plugin directory
$text = e107::getPlugin()->install($data['plugin_folder']);
$mes->addInfo($text);

View File

@@ -164,6 +164,17 @@ if($mode == 'download' && !empty($_GET['src']))
return true;
}
if(e_DEBUG === true)
{
echo "<b>DEBUG MODE ACTIVE (no downloading)</b><br />";
echo '$_GET: ';
print_a($_GET);
echo 'base64 decoded and parsed as $data:';
print_a($data);
return false;
}
$mp = $themec->getMarketplace();
$mes->addSuccess(TPVLAN_85);

View File

@@ -1076,9 +1076,17 @@ class themeHandler
if($_GET['mode'] == 'online')
{
$srcData = array(
'id' => $theme['id'],
'url' => $theme['url'],
'mode' => $theme['mode'],
'price' => $theme['price']
);
$d = http_build_query($theme,false,'&');
$url = e_SELF."?src=".base64_encode($d);
$d = http_build_query($srcData,false,'&');
$base64 = base64_encode($d);
// e107::getDebug()->log($theme['name'].': '.strlen($base64));
$url = e_SELF."?src=".$base64;
$id = $frm->name2id($theme['name']);
$LAN_DOWNLOAD = ($theme['price'] > 0) ? LAN_PURCHASE."/".LAN_DOWN_THEME : LAN_DOWN_THEME;
@@ -1095,7 +1103,7 @@ class themeHandler
}
*/
$downloadUrl = e_SELF.'?mode=download&amp;action='.$action.'&amp;src='.base64_encode($d);//$url.'&amp;action=download';
$downloadUrl = e_SELF.'?mode=download&src='.base64_encode($d);//$url.'&amp;action=download';
$infoUrl = $url.'&amp;action=info';
$viewUrl = $theme['url'];