aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2011-05-18 17:30:26 +0200
committerJörn Zaefferer <joern.zaefferer@gmail.com>2011-05-18 17:30:26 +0200
commit92b0f6702a9408f4bd7d71ccca7e0e851d0efc6b (patch)
tree6a0106d385c8d69dbc05cbe082dd5e109d0f29d0 /ui
parentba6dd5c1805c44998baf3413c7cd37cce9416c96 (diff)
downloadjquery-ui-92b0f6702a9408f4bd7d71ccca7e0e851d0efc6b.tar.gz
jquery-ui-92b0f6702a9408f4bd7d71ccca7e0e851d0efc6b.zip
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
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.datepicker.js3
1 files changed, 3 insertions, 0 deletions
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)