From eca4beb21e61877d76fdf6bea771f72f39544d9b Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Sun, 17 Jan 2016 22:55:32 +0100 Subject: [PATCH] fix utc-millisec regex to avoid a ddos attack --- formats.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/formats.js b/formats.js index 3038dae..9cb8380 100644 --- a/formats.js +++ b/formats.js @@ -11,4 +11,4 @@ exports['alpha'] = /^[a-zA-Z]+$/ exports['alphanumeric'] = /^[a-zA-Z0-9]+$/ exports['style'] = /\s*(.+?):\s*([^;]+);?/g exports['phone'] = /^\+(?:[0-9] ?){6,14}[0-9]$/ -exports['utc-millisec'] = /^[0-9]+(\.?[0-9]+)?$/ +exports['utc-millisec'] = /^[0-9]{1,15}\.?[0-9]{0,15}$/