From a3d0b8aa25e24616abfd35e686348b691064f9c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20T=C3=A4nzer?= Date: Tue, 9 Apr 2013 23:56:38 +0200 Subject: bug 1159: Input validation for the time synchronsation on the signer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michael Tänzer --- CommModule/server.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CommModule/server.pl b/CommModule/server.pl index c70bc9a..6084042 100755 --- a/CommModule/server.pl +++ b/CommModule/server.pl @@ -955,10 +955,10 @@ sub analyze($) if($bytes[1] == 0) # NUL Request { SysLog "NUL Request detected.\n"; - if($fields[1]) + if($fields[1] =~ /^\d+\.\d+$/) { open OUT,">timesync.sh"; - print OUT "date -u $fields[1]\n"; + print OUT "date -u '$fields[1]'\n"; print OUT "hwclock --systohc\n"; close OUT; } -- cgit v1.2.1