From bd0551b22076b82a6d49e9f7a2b2e0c90a1b2326 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Fri, 05 Feb 2016 07:25:27 -0500 Subject: [PATCH] Secure also downloads of addressbook exports, managesieve script exports and Enigma keys exports --- bin/package2composer.sh | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/bin/package2composer.sh b/bin/package2composer.sh index cb43644..c615a17 100755 --- a/bin/package2composer.sh +++ b/bin/package2composer.sh @@ -36,9 +36,10 @@ $data = array( 'name' => $vendor . '/' . strval($package->name), 'type' => 'roundcube-plugin', - 'description' => trim(strval($package->summary) . '; ' . strval($package->description), ';- '), + 'description' => trim(strval($package->description), '- ') ? trim(strval($package->description)) : trim(strval($package->summary)), 'homepage' => strval($package->uri), 'license' => 'GPLv3+', + 'version' => strval($package->version->release), 'authors' => array(), 'repositories' => array( array('type' => 'composer', 'url' => 'http://plugins.roundcube.net'), @@ -55,6 +56,9 @@ if ($package->lead) { foreach ($package->lead as $lead) { + if (strval($lead->active) == 'no') { + continue; + } $data['authors'][] = array( 'name' => strval($lead->name), 'email' => strval($lead->email), @@ -73,6 +77,12 @@ } } +if ($package->dependencies->required->extension) { + foreach ($package->dependencies->required->extension as $ext) { + $data['require']['ext-' . strval($ext->name)] = '*'; + } +} + // remove empty values $data = array_filter($data); -- Gitblit v1.9.1