From 88fb61660a6431039b199bfbfef8760fb6e43723 Mon Sep 17 00:00:00 2001 From: Thomas De Backer Date: Thu, 17 May 2018 16:22:41 +0200 Subject: [PATCH 01/13] restrict custom urls fixed coding standard issues added error message to locale Remove unecessary variable Signed-off-by: Thomas Citharel --- create_poll.php | 3 +++ locale/en.json | 1 + 2 files changed, 4 insertions(+) diff --git a/create_poll.php b/create_poll.php index 91b8ed0..179846a 100644 --- a/create_poll.php +++ b/create_poll.php @@ -112,6 +112,9 @@ if ($goToStep2) { } else if ($pollRepository->existsById($customized_url)) { $error_on_customized_url = true; $error_on_customized_url_msg = __('Error', 'Poll id already used'); + } else if (in_array($customized_url, ['admin', 'vote', 'action'], true)) { + $error_on_customized_url = true; + $error_on_customized_url_msg = __('Error', 'This id is not allowed'); } } diff --git a/locale/en.json b/locale/en.json index d932c55..dd6b2d2 100644 --- a/locale/en.json +++ b/locale/en.json @@ -150,6 +150,7 @@ "The name is invalid.": "The name is invalid.", "The name you've chosen already exist in this poll!": "The name you've chosen already exists in this poll!", "There is a problem with your choices": "There is a problem with your choices", + "This id is not allowed": "This id is not allowed", "This poll doesn't exist !": "This poll doesn't exist!", "Update vote failed": "Update vote failed", "You already voted": "You already voted", From 15e78ba07098a4f3461960d2cc87b19493ee341f Mon Sep 17 00:00:00 2001 From: m Date: Tue, 17 Apr 2018 00:06:46 +0200 Subject: [PATCH 02/13] Better handle undefined config values https://framagit.org/framasoft/framadate/issues/322 --- app/inc/config.template.php | 111 ------------------------------------ app/inc/smarty.php | 2 +- tpl/admin/config.tpl | 12 +++- 3 files changed, 12 insertions(+), 113 deletions(-) delete mode 100644 app/inc/config.template.php diff --git a/app/inc/config.template.php b/app/inc/config.template.php deleted file mode 100644 index cbb20f1..0000000 --- a/app/inc/config.template.php +++ /dev/null @@ -1,111 +0,0 @@ -'; - -// Application name -const NOMAPPLICATION = ''; - -// Database administrator email -const ADRESSEMAILADMIN = ''; - -// Email for automatic responses (you should set it to "no-reply") -const ADRESSEMAILREPONSEAUTO = ''; - -// Database user -const DB_USER= ''; - -// Database password -const DB_PASSWORD = ''; - -// Database server name, leave empty to use a socket -const DB_CONNECTION_STRING = 'mysql:host=;dbname=;port='; - -// Name of the table that stores migration script already executed -const MIGRATION_TABLE = 'framadate_migration'; - -// Table name prefix -const TABLENAME_PREFIX = 'fd_'; - -// Default Language -const DEFAULT_LANGUAGE = 'fr'; - -// List of supported languages, fake constant as arrays can be used as constants only in PHP >=5.6 -$ALLOWED_LANGUAGES = [ - 'fr' => 'Français', - 'en' => 'English', - 'oc' => 'Occitan', - 'es' => 'Español', - 'de' => 'Deutsch', - 'nl' => 'Dutch', - 'it' => 'Italiano', - 'br' => 'Brezhoneg', -]; - -// Path to image file with the title -const IMAGE_TITRE = 'images/logo-framadate.png'; - -// Relative path to favicon -const FAVICON = 'favicon.ico'; - -// Clean URLs, boolean -const URL_PROPRE = false; - -// Use REMOTE_USER data provided by web server -const USE_REMOTE_USER = true; - -// Path to the log file -const LOG_FILE = 'admin/stdout.log'; - -// Days (after expiration date) before purging a poll -const PURGE_DELAY = 60; - -// Max slots per poll -const MAX_SLOTS_PER_POLL = 366; - -// Number of seconds before we allow to resend an "Remember Edit Link" email. -const TIME_EDIT_LINK_EMAIL = 60; - -// Config -$config = [ - /* general config */ - 'use_smtp' => true, // use email for polls creation/modification/responses notification - 'smtp_options' => [ - 'host' => 'localhost', // SMTP server (you could add many servers (main and backup for example) : use ";" like separator - 'auth' => false, // Enable SMTP authentication - 'username' => '', // SMTP username - 'password' => '', // SMTP password - 'secure' => '', // Enable encryption (false, tls or ssl) - 'port' => 25, // TCP port to connect to - ], - 'tracking_code' => '', // add HTML code to every page, useful for tools like Piwik - /* home */ - 'show_what_is_that' => true, // display "how to use" section - 'show_the_software' => true, // display technical information about the software - 'show_cultivate_your_garden' => true, // display "development and administration" information - /* create_classic_poll.php / create_date_poll.php */ - 'default_poll_duration' => 180, // default values for the new poll duration (number of days). - /* create_classic_poll.php */ - 'user_can_add_img_or_link' => true, // user can add link or URL when creating his poll. - 'markdown_editor_by_default' => true, // The markdown editor for the description is enabled by default - 'provide_fork_awesome' => true, // Whether the build-in fork-awesome should be provided -]; diff --git a/app/inc/smarty.php b/app/inc/smarty.php index 84c4e24..350350b 100644 --- a/app/inc/smarty.php +++ b/app/inc/smarty.php @@ -30,7 +30,7 @@ $smarty->assign('SERVER_URL', Utils::get_server_name()); $smarty->assign('SCRIPT_NAME', $_SERVER['SCRIPT_NAME']); $smarty->assign('TITLE_IMAGE', IMAGE_TITRE); $smarty->assign('use_nav_js', strstr($_SERVER['SERVER_NAME'], 'framadate.org')); -$smarty->assign('provide_fork_awesome', $config['provide_fork_awesome']); +$smarty->assign('provide_fork_awesome', isset($config['provide_fork_awesome']) && $config['provide_fork_awesome']); $smarty->assign('locale', $locale); $smarty->assign('langs', $ALLOWED_LANGUAGES); $smarty->assign('date_format', $date_format); diff --git a/tpl/admin/config.tpl b/tpl/admin/config.tpl index b0ae98f..253d283 100644 --- a/tpl/admin/config.tpl +++ b/tpl/admin/config.tpl @@ -86,6 +86,14 @@ const TIME_EDIT_LINK_EMAIL = 60; $config = [ /* general config */ 'use_smtp' => true, // use email for polls creation/modification/responses notification + 'smtp_options' => [ + 'host' => 'localhost', // SMTP server (you could add many servers (main and backup for example) : use ";" like separator + 'auth' => false, // Enable SMTP authentication + 'username' => '', // SMTP username + 'password' => '', // SMTP password + 'secure' => '', // Enable encryption (false, tls or ssl) + 'port' => 25, // TCP port to connect to + ], /* home */ 'show_what_is_that' => true, // display "how to use" section 'show_the_software' => true, // display technical information about the software @@ -94,5 +102,7 @@ $config = [ 'default_poll_duration' => 180, // default values for the new poll duration (number of days). /* create_classic_poll.php */ 'user_can_add_img_or_link' => true, // user can add link or URL when creating his poll. - 'markdown_editor_by_default' => true // The markdown editor for the description is enabled by default + 'markdown_editor_by_default' => true, // The markdown editor for the description is enabled by default + 'provide_fork_awesome' => true, // Whether the build-in fork-awesome should be provided ]; + From a1a7d180f80aa5bca3c43b4bae790553a0c9105f Mon Sep 17 00:00:00 2001 From: m Date: Wed, 18 Apr 2018 17:05:20 +0200 Subject: [PATCH 03/13] fork-awesome enabled by default --- app/inc/smarty.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/inc/smarty.php b/app/inc/smarty.php index 350350b..487a72e 100644 --- a/app/inc/smarty.php +++ b/app/inc/smarty.php @@ -30,7 +30,7 @@ $smarty->assign('SERVER_URL', Utils::get_server_name()); $smarty->assign('SCRIPT_NAME', $_SERVER['SCRIPT_NAME']); $smarty->assign('TITLE_IMAGE', IMAGE_TITRE); $smarty->assign('use_nav_js', strstr($_SERVER['SERVER_NAME'], 'framadate.org')); -$smarty->assign('provide_fork_awesome', isset($config['provide_fork_awesome']) && $config['provide_fork_awesome']); +$smarty->assign('provide_fork_awesome', !isset($config['provide_fork_awesome']) || $config['provide_fork_awesome']); $smarty->assign('locale', $locale); $smarty->assign('langs', $ALLOWED_LANGUAGES); $smarty->assign('date_format', $date_format); From be128e8158aac5a5c912bbf841bcf16b5d2399ff Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 9 Jul 2018 10:56:09 +0200 Subject: [PATCH 04/13] Handle XSS issue on date poll slots Signed-off-by: Thomas Citharel --- app/inc/smarty.php | 4 ++++ tpl/create_date_poll_step_2.tpl | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/inc/smarty.php b/app/inc/smarty.php index 487a72e..ff77dde 100644 --- a/app/inc/smarty.php +++ b/app/inc/smarty.php @@ -77,6 +77,10 @@ function smarty_modifier_html($html) { return Utils::htmlEscape($html); } +function smarty_modifier_html_special_chars($html) { + return Utils::htmlMailEscape($html); +} + function smarty_modifier_datepicker_path($lang) { $i = 0; while (!is_file(path_for_datepicker_locale($lang)) && $i < 3) { diff --git a/tpl/create_date_poll_step_2.tpl b/tpl/create_date_poll_step_2.tpl index da8b355..b68bc5a 100644 --- a/tpl/create_date_poll_step_2.tpl +++ b/tpl/create_date_poll_step_2.tpl @@ -70,7 +70,7 @@
+ placeholder="{__('Generic', 'Time')} {$j+1}" id="d{$i}-h{$j}" name="horaires{$i}[]" value="{$slot|html_special_chars}"/>
{/foreach} From bc28281477515b9757e57f13d274d9e12bb74ee3 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 9 Jul 2018 12:17:33 +0200 Subject: [PATCH 05/13] Update deps and bump PHPMailer to version 6 Signed-off-by: Thomas Citharel --- .../Framadate/Services/MailService.php | 2 +- composer.json | 2 +- composer.lock | 413 +++++++++++------- 3 files changed, 261 insertions(+), 156 deletions(-) diff --git a/app/classes/Framadate/Services/MailService.php b/app/classes/Framadate/Services/MailService.php index 9c32f3f..f99b1fe 100644 --- a/app/classes/Framadate/Services/MailService.php +++ b/app/classes/Framadate/Services/MailService.php @@ -1,7 +1,7 @@ =5.0.0" + "ext-filter": "*", + "php": ">=5.5.0" }, "require-dev": { "doctrine/annotations": "1.2.*", - "jms/serializer": "0.16.*", + "friendsofphp/php-cs-fixer": "^2.2", "phpdocumentor/phpdocumentor": "2.*", - "phpunit/phpunit": "4.8.*", - "symfony/debug": "2.8.*", - "symfony/filesystem": "2.8.*", - "symfony/translation": "2.8.*", - "symfony/yaml": "2.8.*", - "zendframework/zend-cache": "2.5.1", - "zendframework/zend-config": "2.5.1", - "zendframework/zend-eventmanager": "2.5.1", - "zendframework/zend-filter": "2.5.1", - "zendframework/zend-i18n": "2.5.1", - "zendframework/zend-json": "2.5.1", - "zendframework/zend-math": "2.5.1", - "zendframework/zend-serializer": "2.5.*", - "zendframework/zend-servicemanager": "2.5.*", - "zendframework/zend-stdlib": "2.5.1" + "phpunit/phpunit": "^4.8 || ^5.7", + "zendframework/zend-eventmanager": "3.0.*", + "zendframework/zend-i18n": "2.7.3", + "zendframework/zend-serializer": "2.7.*" }, "suggest": { - "league/oauth2-google": "Needed for Google XOAUTH2 authentication" + "ext-mbstring": "Needed to send email in multibyte encoding charset", + "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", + "league/oauth2-google": "Needed for Google XOAUTH2 authentication", + "psr/log": "For optional PSR-3 debug logging", + "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" }, "type": "library", "autoload": { - "classmap": [ - "class.phpmailer.php", - "class.phpmaileroauth.php", - "class.phpmaileroauthgoogle.php", - "class.smtp.php", - "class.pop3.php", - "extras/EasyPeasyICS.php", - "extras/ntlm_sasl_client.php" - ] + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -326,7 +315,7 @@ } ], "description": "PHPMailer is a full-featured email creation and transfer class for PHP", - "time": "2017-11-04T09:26:05+00:00" + "time": "2018-03-27T13:49:45+00:00" }, { "name": "roave/security-advisories", @@ -334,30 +323,30 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "1b2f1f59ff8fc933e4d61ee45214ff3228e20c75" + "reference": "0253937ef2720f45fbe421e3ba486587b3080c35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/1b2f1f59ff8fc933e4d61ee45214ff3228e20c75", - "reference": "1b2f1f59ff8fc933e4d61ee45214ff3228e20c75", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/0253937ef2720f45fbe421e3ba486587b3080c35", + "reference": "0253937ef2720f45fbe421e3ba486587b3080c35", "shasum": "" }, "conflict": { "3f/pygmentize": "<1.2", - "adodb/adodb-php": "<5.20.6", + "adodb/adodb-php": "<5.20.12", "amphp/artax": "<1.0.6|>=2,<2.0.6", "amphp/http": "<1.0.1", "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99", "aws/aws-sdk-php": ">=3,<3.2.1", "bugsnag/bugsnag-laravel": ">=2,<2.0.2", - "cakephp/cakephp": ">=1.3,<1.3.18|>=2,<2.4.99|>=2.5,<2.5.99|>=2.6,<2.6.12|>=2.7,<2.7.6|>=3,<3.0.15|>=3.1,<3.1.4", + "cakephp/cakephp": ">=1.3,<1.3.18|>=2,<2.4.99|>=2.5,<2.5.99|>=2.6,<2.6.12|>=2.7,<2.7.6|>=3,<3.0.15|>=3.1,<3.1.4|>=3.4,<3.4.14|>=3.5,<3.5.17|>=3.6,<3.6.4", "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4", "cartalyst/sentry": "<=2.1.6", "codeigniter/framework": "<=3.0.6", "composer/composer": "<=1.0.0-alpha11", "contao-components/mediaelement": ">=2.14.2,<2.21.1", - "contao/core": ">=2,<3.5.32", - "contao/core-bundle": ">=4,<4.4.8", + "contao/core": ">=2,<3.5.35", + "contao/core-bundle": ">=4,<4.4.18|>=4.5,<4.5.8", "contao/listing-bundle": ">=4,<4.4.8", "contao/newsletter-bundle": ">=4,<4.1", "doctrine/annotations": ">=1,<1.2.7", @@ -370,24 +359,27 @@ "doctrine/mongodb-odm-bundle": ">=2,<3.0.1", "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1", "dompdf/dompdf": ">=0.6,<0.6.2", - "drupal/core": ">=8,<8.4.5", - "drupal/drupal": ">=8,<8.4.5", + "drupal/core": ">=7,<7.59|>=8,<8.4.8|>=8.5,<8.5.3", + "drupal/drupal": ">=7,<7.59|>=8,<8.4.8|>=8.5,<8.5.3", "erusev/parsedown": "<1.7", "ezsystems/ezpublish-legacy": ">=5.3,<5.3.12.3|>=5.4,<5.4.11.3|>=2017.8,<2017.8.1.1|>=2017.12,<2017.12.2.1", "firebase/php-jwt": "<2", "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", + "fuel/core": "<1.8.1", "gree/jose": "<=2.2", "gregwar/rst": "<1.0.3", "guzzlehttp/guzzle": ">=6,<6.2.1|>=4.0.0-rc2,<4.2.4|>=5,<5.3.1", - "illuminate/auth": ">=4,<4.0.99|>=4.1,<4.1.26", + "illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10", "illuminate/database": ">=4,<4.0.99|>=4.1,<4.1.29", + "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", "joomla/session": "<1.3.1", - "laravel/framework": ">=4,<4.0.99|>=4.1,<4.1.29", + "kreait/firebase-php": ">=3.2,<3.8.1", + "laravel/framework": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", "magento/magento1ce": ">=1.5.0.1,<1.9.3.2", "magento/magento1ee": ">=1.9,<1.14.3.2", - "magento/magento2ce": ">=2,<2.2", + "magento/product-community-edition": ">=2,<2.2.5", "monolog/monolog": ">=1.8,<1.12", "namshi/jose": "<2.2", "onelogin/php-saml": "<2.10.4", @@ -396,6 +388,7 @@ "padraic/humbug_get_contents": "<1.1.2", "pagarme/pagarme-php": ">=0,<3", "paragonie/random_compat": "<2", + "paypal/merchant-sdk-php": "<3.12", "phpmailer/phpmailer": ">=5,<5.2.24", "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5.0.10,<5.6.3", "phpxmlrpc/extras": "<0.6.1", @@ -403,6 +396,7 @@ "propel/propel1": ">=1,<=1.7.1", "pusher/pusher-php-server": "<2.2.1", "sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9", + "sensiolabs/connect": "<4.2.3", "shopware/shopware": "<5.3.7", "silverstripe/cms": ">=3,<=3.0.11|>=3.1,<3.1.11", "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", @@ -411,23 +405,26 @@ "simplesamlphp/saml2": "<1.10.6|>=2,<2.3.8|>=3,<3.1.4", "simplesamlphp/simplesamlphp": "<1.15.2", "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1", + "slim/slim": "<2.6", "socalnick/scn-social-auth": "<1.15.2", - "squizlabs/php_codesniffer": ">=1,<2.8.1", + "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1", "stormpath/sdk": ">=0,<9.9.99", "swiftmailer/swiftmailer": ">=4,<5.4.5", "symfony/dependency-injection": ">=2,<2.0.17", "symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13", "symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2", - "symfony/http-foundation": ">=2,<2.3.27|>=2.4,<2.5.11|>=2.6,<2.6.6", + "symfony/http-foundation": ">=2,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", "symfony/http-kernel": ">=2,<2.3.29|>=2.4,<2.5.12|>=2.6,<2.6.8", "symfony/intl": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13", "symfony/routing": ">=2,<2.0.19", - "symfony/security": ">=2,<2.0.25|>=2.1,<2.1.13|>=2.2,<2.2.9|>=2.3,<2.3.37|>=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8.23,<2.8.25|>=3.2.10,<3.2.12|>=3.3.3,<3.3.5", - "symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<2.8.6|>=2.8.23,<2.8.25|>=3,<3.0.6|>=3.2.10,<3.2.12|>=3.3.3,<3.3.5", - "symfony/security-csrf": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13", - "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13", + "symfony/security": ">=2,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", + "symfony/security-bundle": ">=2,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", + "symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<2.8.37|>=3,<3.3.17|>=3.4,<3.4.7|>=4,<4.0.7", + "symfony/security-csrf": ">=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", + "symfony/security-guard": ">=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", + "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", "symfony/serializer": ">=2,<2.0.11", - "symfony/symfony": ">=2,<2.3.41|>=2.4,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13", + "symfony/symfony": ">=2,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", "symfony/translation": ">=2,<2.0.17", "symfony/validator": ">=2,<2.0.24|>=2.1,<2.1.12|>=2.2,<2.2.5|>=2.3,<2.3.3", "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4", @@ -441,11 +438,13 @@ "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4", "willdurand/js-translation-bundle": "<2.1.1", "yiisoft/yii": ">=1.1.14,<1.1.15", - "yiisoft/yii2": "<2.0.14", + "yiisoft/yii2": "<2.0.15", "yiisoft/yii2-bootstrap": "<2.0.4", - "yiisoft/yii2-dev": "<2.0.14", + "yiisoft/yii2-dev": "<2.0.15", + "yiisoft/yii2-elasticsearch": "<2.0.5", "yiisoft/yii2-gii": "<2.0.4", "yiisoft/yii2-jui": "<2.0.4", + "yiisoft/yii2-redis": "<2.0.8", "zendframework/zend-cache": ">=2.4,<2.4.8|>=2.5,<2.5.3", "zendframework/zend-captcha": ">=2,<2.4.9|>=2.5,<2.5.2", "zendframework/zend-crypt": ">=2,<2.4.9|>=2.5,<2.5.2", @@ -483,20 +482,20 @@ } ], "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", - "time": "2018-03-15T17:53:05+00:00" + "time": "2018-07-04T05:48:21+00:00" }, { "name": "smarty/smarty", - "version": "v3.1.31", + "version": "v3.1.32", "source": { "type": "git", "url": "https://github.com/smarty-php/smarty.git", - "reference": "c7d42e4a327c402897dd587871434888fde1e7a9" + "reference": "ac9d4b587e5bf53381e21881820a9830765cb459" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/smarty-php/smarty/zipball/c7d42e4a327c402897dd587871434888fde1e7a9", - "reference": "c7d42e4a327c402897dd587871434888fde1e7a9", + "url": "https://api.github.com/repos/smarty-php/smarty/zipball/ac9d4b587e5bf53381e21881820a9830765cb459", + "reference": "ac9d4b587e5bf53381e21881820a9830765cb459", "shasum": "" }, "require": { @@ -536,7 +535,7 @@ "keywords": [ "templating" ], - "time": "2016-12-14T21:57:25+00:00" + "time": "2018-04-24T14:53:33+00:00" } ], "packages-dev": [ @@ -602,6 +601,50 @@ ], "time": "2016-08-30T16:08:34+00:00" }, + { + "name": "composer/xdebug-handler", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "c919dc6c62e221fc6406f861ea13433c0aa24f08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/c919dc6c62e221fc6406f861ea13433c0aa24f08", + "reference": "c919dc6c62e221fc6406f861ea13433c0aa24f08", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0", + "psr/log": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "time": "2018-04-11T15:42:36+00:00" + }, { "name": "doctrine/annotations", "version": "v1.4.0", @@ -726,25 +769,26 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v2.10.4", + "version": "v2.12.2", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "b2dce1dacff988b79c4aadf252e5dee31bc04e19" + "reference": "dcc87d5414e9d0bd316fce81a5bedb9ce720b183" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/b2dce1dacff988b79c4aadf252e5dee31bc04e19", - "reference": "b2dce1dacff988b79c4aadf252e5dee31bc04e19", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/dcc87d5414e9d0bd316fce81a5bedb9ce720b183", + "reference": "dcc87d5414e9d0bd316fce81a5bedb9ce720b183", "shasum": "" }, "require": { "composer/semver": "^1.4", + "composer/xdebug-handler": "^1.0", "doctrine/annotations": "^1.2", "ext-json": "*", "ext-tokenizer": "*", "php": "^5.6 || >=7.0 <7.3", - "php-cs-fixer/diff": "^1.2", + "php-cs-fixer/diff": "^1.3", "symfony/console": "^3.2 || ^4.0", "symfony/event-dispatcher": "^3.0 || ^4.0", "symfony/filesystem": "^3.0 || ^4.0", @@ -761,16 +805,20 @@ "require-dev": { "johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0", "justinrainbow/json-schema": "^5.0", - "keradus/cli-executor": "^1.0", + "keradus/cli-executor": "^1.1", "mikey179/vfsstream": "^1.6", - "php-coveralls/php-coveralls": "^2.0", + "php-coveralls/php-coveralls": "^2.1", "php-cs-fixer/accessible-object": "^1.0", - "phpunit/phpunit": "^5.7.23 || ^6.4.3", - "phpunitgoodpractices/traits": "^1.3.1", - "symfony/phpunit-bridge": "^3.2.2 || ^4.0" + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.0.1", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.0.1", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1", + "phpunitgoodpractices/traits": "^1.5.1", + "symfony/phpunit-bridge": "^4.0" }, "suggest": { "ext-mbstring": "For handling non-UTF8 characters in cache signature.", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." }, "bin": [ @@ -786,7 +834,6 @@ "tests/Test/AbstractIntegrationCaseFactory.php", "tests/Test/AbstractIntegrationTestCase.php", "tests/Test/Assert/AssertTokensTrait.php", - "tests/Test/Constraint/SameStringsConstraint.php", "tests/Test/IntegrationCase.php", "tests/Test/IntegrationCaseFactory.php", "tests/Test/IntegrationCaseFactoryInterface.php", @@ -809,7 +856,7 @@ } ], "description": "A tool to automatically fix PHP code style", - "time": "2018-03-08T11:13:12+00:00" + "time": "2018-07-06T10:37:40+00:00" }, { "name": "myclabs/deep-copy", @@ -858,16 +905,16 @@ }, { "name": "paragonie/random_compat", - "version": "v2.0.11", + "version": "v2.0.17", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8" + "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/5da4d3c796c275c55f057af5a643ae297d96b4d8", - "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/29af24f25bab834fcbb38ad2a69fa93b867e070d", + "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d", "shasum": "" }, "require": { @@ -899,10 +946,11 @@ "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", "keywords": [ "csprng", + "polyfill", "pseudorandom", "random" ], - "time": "2017-09-27T21:40:39+00:00" + "time": "2018-07-04T16:31:37+00:00" }, { "name": "php-cs-fixer/diff", @@ -1103,23 +1151,23 @@ }, { "name": "phpspec/prophecy", - "version": "1.7.5", + "version": "1.7.6", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401" + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/dfd6be44111a7c41c2e884a336cc4f461b3b2401", - "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { @@ -1162,7 +1210,7 @@ "spy", "stub" ], - "time": "2018-02-19T10:16:54+00:00" + "time": "2018-04-18T13:57:24+00:00" }, { "name": "phpunit/php-code-coverage", @@ -2116,16 +2164,16 @@ }, { "name": "symfony/console", - "version": "v3.4.6", + "version": "v3.4.12", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "067339e9b8ec30d5f19f5950208893ff026b94f7" + "reference": "1b97071a26d028c9bd4588264e101e14f6e7cd00" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/067339e9b8ec30d5f19f5950208893ff026b94f7", - "reference": "067339e9b8ec30d5f19f5950208893ff026b94f7", + "url": "https://api.github.com/repos/symfony/console/zipball/1b97071a26d028c9bd4588264e101e14f6e7cd00", + "reference": "1b97071a26d028c9bd4588264e101e14f6e7cd00", "shasum": "" }, "require": { @@ -2146,7 +2194,7 @@ "symfony/process": "~3.3|~4.0" }, "suggest": { - "psr/log": "For using the console logger", + "psr/log-implementation": "For using the console logger", "symfony/event-dispatcher": "", "symfony/lock": "", "symfony/process": "" @@ -2181,20 +2229,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-02-26T15:46:28+00:00" + "time": "2018-05-23T05:02:55+00:00" }, { "name": "symfony/debug", - "version": "v3.4.6", + "version": "v3.4.12", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "9b1071f86e79e1999b3d3675d2e0e7684268b9bc" + "reference": "47e6788c5b151cf0cfdf3329116bf33800632d75" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/9b1071f86e79e1999b3d3675d2e0e7684268b9bc", - "reference": "9b1071f86e79e1999b3d3675d2e0e7684268b9bc", + "url": "https://api.github.com/repos/symfony/debug/zipball/47e6788c5b151cf0cfdf3329116bf33800632d75", + "reference": "47e6788c5b151cf0cfdf3329116bf33800632d75", "shasum": "" }, "require": { @@ -2237,20 +2285,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2018-02-28T21:49:22+00:00" + "time": "2018-06-25T11:10:40+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v3.4.6", + "version": "v3.4.12", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "58990682ac3fdc1f563b7e705452921372aad11d" + "reference": "fdd5abcebd1061ec647089c6c41a07ed60af09f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/58990682ac3fdc1f563b7e705452921372aad11d", - "reference": "58990682ac3fdc1f563b7e705452921372aad11d", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/fdd5abcebd1061ec647089c6c41a07ed60af09f8", + "reference": "fdd5abcebd1061ec647089c6c41a07ed60af09f8", "shasum": "" }, "require": { @@ -2300,24 +2348,25 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2018-02-14T10:03:57+00:00" + "time": "2018-04-06T07:35:25+00:00" }, { "name": "symfony/filesystem", - "version": "v3.4.6", + "version": "v3.4.12", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "253a4490b528597aa14d2bf5aeded6f5e5e4a541" + "reference": "8a721a5f2553c6c3482b1c5b22ed60fe94dd63ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/253a4490b528597aa14d2bf5aeded6f5e5e4a541", - "reference": "253a4490b528597aa14d2bf5aeded6f5e5e4a541", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/8a721a5f2553c6c3482b1c5b22ed60fe94dd63ed", + "reference": "8a721a5f2553c6c3482b1c5b22ed60fe94dd63ed", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8" + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-ctype": "~1.8" }, "type": "library", "extra": { @@ -2349,20 +2398,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2018-02-22T10:48:49+00:00" + "time": "2018-06-21T11:10:19+00:00" }, { "name": "symfony/finder", - "version": "v3.4.6", + "version": "v3.4.12", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "a479817ce0a9e4adfd7d39c6407c95d97c254625" + "reference": "3a8c3de91d2b2c68cd2d665cf9d00f7ef9eaa394" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/a479817ce0a9e4adfd7d39c6407c95d97c254625", - "reference": "a479817ce0a9e4adfd7d39c6407c95d97c254625", + "url": "https://api.github.com/repos/symfony/finder/zipball/3a8c3de91d2b2c68cd2d665cf9d00f7ef9eaa394", + "reference": "3a8c3de91d2b2c68cd2d665cf9d00f7ef9eaa394", "shasum": "" }, "require": { @@ -2398,20 +2447,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2018-03-05T18:28:11+00:00" + "time": "2018-06-19T20:52:10+00:00" }, { "name": "symfony/options-resolver", - "version": "v3.4.6", + "version": "v3.4.12", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "f3109a6aedd20e35c3a33190e932c2b063b7b50e" + "reference": "cc5e98ed91688a22a7162a8800096356f9076b1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/f3109a6aedd20e35c3a33190e932c2b063b7b50e", - "reference": "f3109a6aedd20e35c3a33190e932c2b063b7b50e", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/cc5e98ed91688a22a7162a8800096356f9076b1d", + "reference": "cc5e98ed91688a22a7162a8800096356f9076b1d", "shasum": "" }, "require": { @@ -2452,20 +2501,75 @@ "configuration", "options" ], - "time": "2018-01-11T07:56:07+00:00" + "time": "2018-05-30T04:26:49+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.7.0", + "name": "symfony/polyfill-ctype", + "version": "v1.8.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b", - "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7cc359f1b7b80fc25ed7796be7d96adc9b354bae", + "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2018-04-30T19:57:29+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.8.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "3296adf6a6454a050679cde90f95350ad604b171" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171", + "reference": "3296adf6a6454a050679cde90f95350ad604b171", "shasum": "" }, "require": { @@ -2477,7 +2581,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.8-dev" } }, "autoload": { @@ -2511,20 +2615,20 @@ "portable", "shim" ], - "time": "2018-01-30T19:27:44+00:00" + "time": "2018-04-26T10:06:28+00:00" }, { "name": "symfony/polyfill-php70", - "version": "v1.7.0", + "version": "v1.8.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "3532bfcd8f933a7816f3a0a59682fc404776600f" + "reference": "77454693d8f10dd23bb24955cffd2d82db1007a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/3532bfcd8f933a7816f3a0a59682fc404776600f", - "reference": "3532bfcd8f933a7816f3a0a59682fc404776600f", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/77454693d8f10dd23bb24955cffd2d82db1007a6", + "reference": "77454693d8f10dd23bb24955cffd2d82db1007a6", "shasum": "" }, "require": { @@ -2534,7 +2638,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.8-dev" } }, "autoload": { @@ -2570,20 +2674,20 @@ "portable", "shim" ], - "time": "2018-01-30T19:27:44+00:00" + "time": "2018-04-26T10:06:28+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.7.0", + "version": "v1.8.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "8eca20c8a369e069d4f4c2ac9895144112867422" + "reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/8eca20c8a369e069d4f4c2ac9895144112867422", - "reference": "8eca20c8a369e069d4f4c2ac9895144112867422", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/a4576e282d782ad82397f3e4ec1df8e0f0cafb46", + "reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46", "shasum": "" }, "require": { @@ -2592,7 +2696,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.8-dev" } }, "autoload": { @@ -2625,20 +2729,20 @@ "portable", "shim" ], - "time": "2018-01-31T17:43:24+00:00" + "time": "2018-04-26T10:06:28+00:00" }, { "name": "symfony/process", - "version": "v3.4.6", + "version": "v3.4.12", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "cc4aea21f619116aaf1c58016a944e4821c8e8af" + "reference": "acc5a37c706ace827962851b69705b24e71ca17c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/cc4aea21f619116aaf1c58016a944e4821c8e8af", - "reference": "cc4aea21f619116aaf1c58016a944e4821c8e8af", + "url": "https://api.github.com/repos/symfony/process/zipball/acc5a37c706ace827962851b69705b24e71ca17c", + "reference": "acc5a37c706ace827962851b69705b24e71ca17c", "shasum": "" }, "require": { @@ -2674,11 +2778,11 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2018-02-12T17:55:00+00:00" + "time": "2018-05-30T04:24:30+00:00" }, { "name": "symfony/stopwatch", - "version": "v3.4.6", + "version": "v3.4.12", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", @@ -2727,20 +2831,21 @@ }, { "name": "symfony/yaml", - "version": "v3.4.6", + "version": "v3.4.12", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "6af42631dcf89e9c616242c900d6c52bd53bd1bb" + "reference": "c5010cc1692ce1fa328b1fb666961eb3d4a85bb0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/6af42631dcf89e9c616242c900d6c52bd53bd1bb", - "reference": "6af42631dcf89e9c616242c900d6c52bd53bd1bb", + "url": "https://api.github.com/repos/symfony/yaml/zipball/c5010cc1692ce1fa328b1fb666961eb3d4a85bb0", + "reference": "c5010cc1692ce1fa328b1fb666961eb3d4a85bb0", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8" + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-ctype": "~1.8" }, "conflict": { "symfony/console": "<3.4" @@ -2781,7 +2886,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2018-02-16T09:50:28+00:00" + "time": "2018-05-03T23:18:14+00:00" }, { "name": "webmozart/assert", From cad9dac18981b2ec034fa6dfbb6e6da36ab5c542 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 9 Jul 2018 12:17:59 +0200 Subject: [PATCH 06/13] Fix an issue with smarty filters and priority Signed-off-by: Thomas Citharel --- tpl/part/vote_table_date.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tpl/part/vote_table_date.tpl b/tpl/part/vote_table_date.tpl index b3f06d8..1584ef0 100644 --- a/tpl/part/vote_table_date.tpl +++ b/tpl/part/vote_table_date.tpl @@ -55,7 +55,7 @@ {$count_same = 0} {/if} - {$count_same = $count_same + $slot->moments|count} + {$count_same = $count_same + ($slot->moments|count)} {if $slot@last} {$display} From 0da24788d0c9673c2eb8f5728e55015111124e7e Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 9 Jul 2018 12:18:22 +0200 Subject: [PATCH 07/13] Bump version (yeah, forgot last one) Signed-off-by: Thomas Citharel --- app/inc/constants.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/inc/constants.php b/app/inc/constants.php index d00c406..f37bc40 100644 --- a/app/inc/constants.php +++ b/app/inc/constants.php @@ -18,7 +18,7 @@ */ // FRAMADATE version -const VERSION = '1.1.4'; +const VERSION = '1.1.6'; // PHP Needed version const PHP_NEEDED_VERSION = '5.6'; From a6e337e046a97194060b37f324ade1caaccb1fd8 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 9 Jul 2018 15:50:46 +0200 Subject: [PATCH 08/13] Fix issue with limit of participants Signed-off-by: Thomas Citharel --- app/classes/Framadate/Services/InputService.php | 16 ++++++++-------- create_date_poll.php | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/classes/Framadate/Services/InputService.php b/app/classes/Framadate/Services/InputService.php index 904fe95..2b41c88 100644 --- a/app/classes/Framadate/Services/InputService.php +++ b/app/classes/Framadate/Services/InputService.php @@ -69,23 +69,23 @@ class InputService { public function filterMail($mail) { /////////////////////////////////////////////////////////////////////////////////////// // formatting - + $mail = trim($mail); - + /////////////////////////////////////////////////////////////////////////////////////// // e-mail validation - + $resultat = FALSE; - + $validator = new EmailValidator(); - + if ($validator->isValid($mail, new RFCValidation())) { $resultat = $mail; } - + /////////////////////////////////////////////////////////////////////////////////////// // return - + return $resultat; } @@ -104,7 +104,7 @@ class InputService { public function filterValueMax($int) { - return $this->filterInteger($int) >= 1; + return $this->filterInteger($int) >= 1 ? $this->filterInteger($int) : false; } public function filterBoolean($boolean) { diff --git a/create_date_poll.php b/create_date_poll.php index a66330d..83e0496 100644 --- a/create_date_poll.php +++ b/create_date_poll.php @@ -236,7 +236,7 @@ switch ($step) { // creation message $sessionService->set("Framadate", "messagePollCreated", TRUE); - + // Redirect to poll administration header('Location:' . Utils::getUrlSondage($admin_poll_id, true)); exit; From b40957f484bcb4467f6fb2efd96f1f327754e420 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 9 Jul 2018 15:51:05 +0200 Subject: [PATCH 09/13] Bump version Signed-off-by: Thomas Citharel --- app/inc/constants.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/inc/constants.php b/app/inc/constants.php index f37bc40..28107fb 100644 --- a/app/inc/constants.php +++ b/app/inc/constants.php @@ -18,7 +18,7 @@ */ // FRAMADATE version -const VERSION = '1.1.6'; +const VERSION = '1.1.7'; // PHP Needed version const PHP_NEEDED_VERSION = '5.6'; From 5ffd4361e457e4b7a1f72f3ab5e799245836cc11 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 3 Aug 2018 14:06:23 +0200 Subject: [PATCH 10/13] Fix #358, #355 and #342 Signed-off-by: Thomas Citharel --- .gitignore | 3 +- .gitlab-ci.yml | 6 ++-- admin/install.php | 8 +++-- .../Framadate/Services/InstallService.php | 32 +++++++++++-------- tpl/admin/install.tpl | 5 ++- tpl_c/.gitkeep | 0 6 files changed, 32 insertions(+), 22 deletions(-) create mode 100644 tpl_c/.gitkeep diff --git a/.gitignore b/.gitignore index 69538d1..cf92027 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,8 @@ nav app/inc/config.php vendor cache/ -tpl_c/ +tpl_c/* +!tpl_c/.gitkeep .php_cs.cache .zanata-cache/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e56ec24..976a30b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,6 @@ test: stage: test script: - composer install -o --no-interaction --no-progress --prefer-dist - - mkdir tpl_c - php vendor/bin/php-cs-fixer fix --verbose --dry-run - vendor/bin/phpunit --bootstrap app/tests/bootstrap.php --debug app/tests cache: @@ -39,10 +38,10 @@ pages: - git checkout ${latesttag} - composer install -o --no-interaction --no-progress --prefer-dist --no-dev - composer dump-autoload --optimize --no-dev --classmap-authoritative - - mkdir tpl_c - mkdir framadate - mv `ls -A | grep -v framadate` ./framadate - - chmod -R 644 framadate/ && chmod -R 770 framadate/tpl_c/ && chmod -R 770 framadate/app/inc/ + - find framadate/ -type d -exec chmod 750 {} \; + - find framadate/ -type f -exec chmod 640 {} \; - zip -r latest.zip framadate - mkdir .public - cp latest.zip .public @@ -64,7 +63,6 @@ beta: - composer dump-autoload --optimize --no-dev --classmap-authoritative - if [ ! -z ${ZANATA_CONFIG_FRAMABOT+x} ]; then mkdir -p ${HOME}/.config; echo -e "${ZANATA_CONFIG_FRAMABOT}" > ${HOME}/.config/zanata.ini; fi - if [ ! -z ${ZANATA_CONFIG_FRAMABOT+x} ]; then make pull-locales; fi - - mkdir tpl_c - mkdir .public - cp -r * .public - cp -r .git .public diff --git a/admin/install.php b/admin/install.php index 2876120..ee9edd3 100644 --- a/admin/install.php +++ b/admin/install.php @@ -37,11 +37,13 @@ if (!empty($_POST)) { if ($result['status'] === 'OK') { header(('Location: ' . Utils::get_server_name() . 'admin/migration.php')); exit; - } - $error = __('Error', $result['code']); + } + + $error = __('Error', $result['code']); } $smarty->assign('error', $error); +$smarty->assign('error_details', $result['details']); $smarty->assign('title', __('Admin', 'Installation')); $smarty->assign('fields', $installService->getFields()); -$smarty->display('admin/install.tpl'); \ No newline at end of file +$smarty->display('admin/install.tpl'); diff --git a/app/classes/Framadate/Services/InstallService.php b/app/classes/Framadate/Services/InstallService.php index 13672fa..8f9f668 100644 --- a/app/classes/Framadate/Services/InstallService.php +++ b/app/classes/Framadate/Services/InstallService.php @@ -55,9 +55,10 @@ class InstallService { } // Connect to database - $connect = $this->connectTo($this->fields['dbConnectionString'], $this->fields['dbUser'], $this->fields['dbPassword']); - if (!$connect) { - return $this->error('CANT_CONNECT_TO_DATABASE'); + try { + $connect = $this->connectTo($this->fields['dbConnectionString'], $this->fields['dbUser'], $this->fields['dbPassword']); + } catch(\Exception $e) { + return $this->error('CANT_CONNECT_TO_DATABASE', $e->getMessage()); } // Write configuration to conf.php file @@ -68,15 +69,19 @@ class InstallService { return $this->ok(); } + /** + * Connect to PDO compatible source + * + * @param string $connectionString + * @param string $user + * @param string $password + * @return \PDO + */ function connectTo($connectionString, $user, $password) { - try { - $pdo = @new \PDO($connectionString, $user, $password); - $pdo->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_OBJ); - $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); - return $pdo; - } catch(\Exception $e) { - return null; - } + $pdo = @new \PDO($connectionString, $user, $password); + $pdo->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_OBJ); + $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); + return $pdo; } function writeConfiguration(Smarty &$smarty) { @@ -110,10 +115,11 @@ class InstallService { * @param $msg * @return array */ - function error($msg) { + function error($msg, $details = '') { return [ 'status' => 'ERROR', - 'code' => $msg + 'code' => $msg, + 'details' => $details, ]; } diff --git a/tpl/admin/install.tpl b/tpl/admin/install.tpl index 38f613c..21b9cbc 100644 --- a/tpl/admin/install.tpl +++ b/tpl/admin/install.tpl @@ -6,7 +6,10 @@
{if $error} -
{$error}
+
+

{$error}

+ {$error_details} +
{/if}
diff --git a/tpl_c/.gitkeep b/tpl_c/.gitkeep new file mode 100644 index 0000000..e69de29 From 70db1e91e0ab8291d9df80f62b945fed1555a488 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 3 Aug 2018 14:07:02 +0200 Subject: [PATCH 11/13] Release v1.1.8-beta.1 Signed-off-by: Thomas Citharel --- app/inc/constants.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/inc/constants.php b/app/inc/constants.php index 28107fb..d149d99 100644 --- a/app/inc/constants.php +++ b/app/inc/constants.php @@ -18,7 +18,7 @@ */ // FRAMADATE version -const VERSION = '1.1.7'; +const VERSION = '1.1.8-beta.1'; // PHP Needed version const PHP_NEEDED_VERSION = '5.6'; From 79586319fc52603a689295b1aef7a3959fc85db2 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 3 Aug 2018 14:29:45 +0200 Subject: [PATCH 12/13] Add session.cookie_httponly = 1 to local php.ini Signed-off-by: Thomas Citharel --- php.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php.ini b/php.ini index bde5cfc..844099a 100644 --- a/php.ini +++ b/php.ini @@ -4,7 +4,7 @@ log_errors = On error_log = /var/log/apache2/error.log ignore_repeated_errors = On register_globals = Off - +session.cookie_httponly = 1 [Date] date.timezone = "Europe/Paris" From 84ac58c430f92b9d9aaa111ecba55d095a049699 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 3 Aug 2018 14:30:09 +0200 Subject: [PATCH 13/13] Release 1.1.8 Signed-off-by: Thomas Citharel --- app/inc/constants.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/inc/constants.php b/app/inc/constants.php index d149d99..0f41737 100644 --- a/app/inc/constants.php +++ b/app/inc/constants.php @@ -18,7 +18,7 @@ */ // FRAMADATE version -const VERSION = '1.1.8-beta.1'; +const VERSION = '1.1.8'; // PHP Needed version const PHP_NEEDED_VERSION = '5.6';