summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2013-04-09 23:56:38 +0200
committerMichael Tänzer <neo@nhng.de>2013-04-09 23:56:38 +0200
commita3d0b8aa25e24616abfd35e686348b691064f9c7 (patch)
tree93ce0d2b201322fbe279541ffefdbdf05dcf8b2c
parentef6fa684e0c1ac2155036cc2981c65482de92bfc (diff)
downloadcacert-devel-bug-1159.tar.gz
cacert-devel-bug-1159.tar.xz
cacert-devel-bug-1159.zip
bug 1159: Input validation for the time synchronsation on the signerbug-1159
Signed-off-by: Michael Tänzer <neo@nhng.de>
-rwxr-xr-xCommModule/server.pl4
1 files 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;
}