From e1b3df36b695004bdcbbd747e7cc8d023dd1bcb5 Mon Sep 17 00:00:00 2001 From: Karsten Dambekalns Date: Mon, 10 Oct 2016 11:47:29 +0200 Subject: [PATCH 1/2] TASK: Add SwiftMailer as a suggested dependency --- composer.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1bc4184..e0fad6f 100644 --- a/composer.json +++ b/composer.json @@ -10,5 +10,8 @@ "psr-0": { "TYPO3\\Form": "Classes" } + }, + "suggest": { + "typo3/swiftmailer": "The EmailFinisher needs this to be useable" } -} \ No newline at end of file +} From 0569c0c6998c20ce1e99fbdc8ab99ee775436aec Mon Sep 17 00:00:00 2001 From: Karsten Dambekalns Date: Wed, 12 Apr 2017 10:01:53 +0200 Subject: [PATCH 2/2] TASK: Use generateRandomString() instead of uniqid() This reduces the risk of collision in auto-generated field names. --- Classes/TYPO3/Form/ViewHelpers/Form/DatePickerViewHelper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Classes/TYPO3/Form/ViewHelpers/Form/DatePickerViewHelper.php b/Classes/TYPO3/Form/ViewHelpers/Form/DatePickerViewHelper.php index 1bfe938..adc685f 100644 --- a/Classes/TYPO3/Form/ViewHelpers/Form/DatePickerViewHelper.php +++ b/Classes/TYPO3/Form/ViewHelpers/Form/DatePickerViewHelper.php @@ -12,6 +12,7 @@ * */ use TYPO3\Flow\Annotations as Flow; +use TYPO3\Flow\Utility\Algorithms; /** * Display a jQuery date picker. @@ -73,7 +74,7 @@ public function render($dateFormat = 'Y-m-d', $enableDatePicker = true) if ($this->hasArgument('id')) { $id = $this->arguments['id']; } else { - $id = 'field' . md5(uniqid()); + $id = 'field' . md5(Algorithms::generateRandomString(13)); $this->tag->addAttribute('id', $id); } $this->setErrorClassAttribute();