Skip to content

Commit

Permalink
Backported test for open_ssl in extensions.
Browse files Browse the repository at this point in the history
  • Loading branch information
apmuthu committed Sep 30, 2017
1 parent 8cd2627 commit dcc318c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions FAMods/CHANGELOG_apmuthu.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
2017-09-30 Ap.Muthu Backported OpenSSL Verify check and pkg sorted display
2017-08-18 Ap.Muthu Backported EAN-8 Barcode to tcpdf barcode library
2017-08-18 Ap.Muthu Imported barcodes.php from core for EAN 8 extension
2017-08-15 Ap.Muthu Generate EAN-8 Barcode for new Inventory Items
Expand Down
17 changes: 12 additions & 5 deletions FAMods/includes/packages.inc
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ function get_pkg_or_list($type = null, $pkgname = null, $filter=array(), $outkey
$sig = url_get_contents($repo.'/Release.sig');
$data = file_get_contents($loclist);
$cert = file_get_contents(PUBKEY_PATH.'/FA.pem');
if (!function_exists('openssl_verify')) {
display_error(_("OpenSSL have to be available on your server to use extension repository system."));
return null;
}
if ((!isset($repo_sign) || $repo_sign == 1) && openssl_verify($data, $sig, $cert) <= 0) {
if ($refresh) {
if (!@unlink($loclist))
Expand Down Expand Up @@ -468,7 +472,8 @@ function get_languages_list()
else
$pkgs[$l['package']] = array_merge($pkgs[$l['package']], $l);
}
ksort($pkgs);
if ($pkgs)
ksort($pkgs);
return $pkgs;
}
//---------------------------------------------------------------------------------------
Expand Down Expand Up @@ -531,7 +536,8 @@ function get_extensions_list($type = null)
// else
$pkgs[$ext['package']] = array_merge($pkgs[$ext['package']], $ext);
}
ksort($pkgs);
if ($pkgs)
ksort($pkgs);
return $pkgs;
}
//
Expand All @@ -558,8 +564,8 @@ function get_themes_list()
}
}
// TODO: Add other themes from themes directory

ksort($pkgs);
if ($pkgs)
ksort($pkgs);
return $pkgs;
}
//---------------------------------------------------------------------------------------
Expand Down Expand Up @@ -592,7 +598,8 @@ function get_charts_list()
else
$pkgs[$ext['package']] = array_merge($pkgs[$ext['package']], $ext);
}
ksort($pkgs);
if ($pkgs)
ksort($pkgs);
return $pkgs;
}
//---------------------------------------------------------------------------------------------
Expand Down

0 comments on commit dcc318c

Please sign in to comment.