Skip to content

Commit

Permalink
! Probably the least of the worries in terms of an exploit via
Browse files Browse the repository at this point in the history
this tunnel, but safe is safe.

Signed-off-by: Spuds <spuds@spudsdesign.com>
  • Loading branch information
Spuds committed Jul 9, 2014
1 parent 05d8c39 commit aa42df7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sources/admin/PackageServers.controller.php
Expand Up @@ -206,7 +206,7 @@ public function action_browse()

// Use the package list's name if it exists.
if ($listing->exists('list-title'))
$name = $listing->fetch('list-title');
$name = Util::htmlspecialchars($listing->fetch('list-title'));

// Pick the correct template.
$context['sub_template'] = 'package_list';
Expand Down Expand Up @@ -379,7 +379,7 @@ public function action_browse()
$package['author']['website']['name'] = $default_website;

if ($thisPackage->exists('website') && $thisPackage->fetch('website') != '')
$authorhomepage = $thisPackage->fetch('website');
$authorhomepage = Util::htmlspecialchars($thisPackage->fetch('website'));
else
$authorhomepage = $default_website;

Expand Down
5 changes: 3 additions & 2 deletions sources/subs/Package.subs.php
Expand Up @@ -532,11 +532,12 @@ function getPackageInfo($gzfilename)

$packageInfo = $packageInfo->path('package-info[0]');

$package = $packageInfo->to_array();
// Convert packageInfo to an array for use
$package = htmlspecialchars__recursive($packageInfo->to_array());
$package['xml'] = $packageInfo;
$package['filename'] = $gzfilename;
$package['name'] = Util::htmlspecialchars($package['name']);

// Set a default type if none was supplied in the package
if (!isset($package['type']))
$package['type'] = 'modification';

Expand Down

0 comments on commit aa42df7

Please sign in to comment.