From 92b0f6702a9408f4bd7d71ccca7e0e851d0efc6b Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Wed, 18 May 2011 17:30:26 +0200 Subject: There's no guard against unparsed characters at the end of the date string, any extra characters are just ignored Fixes #7244 - Datepicker: parseDate() does not throw an exception for long years --- ui/jquery.ui.datepicker.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ui/jquery.ui.datepicker.js') diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index 021041202..4c73bdfd8 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -1082,6 +1082,9 @@ $.extend(Datepicker.prototype, { checkLiteral(); } } + if (iValue < value.length){ + throw "Extra/unparsed characters found in date: " + value.substring(iValue); + } if (year == -1) year = new Date().getFullYear(); else if (year < 100) -- cgit v1.2.3