Skip to content

Localized date not sanitized #10472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dpaleino opened this issue Aug 9, 2017 · 1 comment
Closed

Localized date not sanitized #10472

dpaleino opened this issue Aug 9, 2017 · 1 comment
Labels
bug report Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed

Comments

@dpaleino
Copy link

dpaleino commented Aug 9, 2017

Hello,
Magento 2.1.7. In /admin/admin/system_design/new/ , I have two datepickers, which correctly show me localized month names, and date format (for Italy, that's dd/mm/yyyy). Clicking a date for the popup correctly populates the input field with the localized format.

As soon as I click Save, I get:

Exception #0 (Exception): Invalid input date format '31/12/2017'

Going back, and manually inputting the date in the mm/dd/yyyy format correctly saves it (and then, in the grid, it shows up with the correct localized format)

screen

Here's the first few lines of the backtrace:

Exception #0 (Exception): Invalid input date format '31/12/2017'
#0 /home/dp/magento2/vendor/magento/zendframework1/library/Zend/Filter.php(114): Magento\Framework\Stdlib\DateTime\Filter\Date->filter('31/12/2017')
#1 /home/dp/magento2/vendor/magento/zendframework1/library/Zend/Filter/Input.php(722): Zend_Filter->filter('31/12/2017')
#2 /home/dp/magento2/vendor/magento/zendframework1/library/Zend/Filter/Input.php(701): Zend_Filter_Input->_filterRule(Array)
#3 /home/dp/magento2/vendor/magento/zendframework1/library/Zend/Filter/Input.php(785): Zend_Filter_Input->_filter()
#4 /home/dp/magento2/vendor/magento/zendframework1/library/Zend/Filter/Input.php(381): Zend_Filter_Input->_process()
#5 /home/dp/magento2/vendor/magento/module-backend/Controller/Adminhtml/System/Design/Save.php(24): Zend_Filter_Input->getUnescaped()
#6 /home/dp/magento2/vendor/magento/module-backend/Controller/Adminhtml/System/Design/Save.php(38): Magento\Backend\Controller\Adminhtml\System\Design\Save->_filterPostData(Array)

@magento-engcom-team
Copy link
Contributor

Duplicate of #10580

@magento-engcom-team magento-engcom-team marked this as a duplicate of #10580 Sep 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed
Projects
None yet
Development

No branches or pull requests

3 participants