]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
time.cgi: Fixes bug 13883
authorAdolf Belka <adolf.belka@ipfire.org>
Thu, 25 Sep 2025 11:12:43 +0000 (13:12 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 2 Oct 2025 16:54:59 +0000 (16:54 +0000)
Fixes: bug 13883 - time.cgi UPDATE_VALUE Stored Cross-Site Scripting
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/time.cgi

index 04c1e771f792e8f178f0602b7911facafc66d51f..d465354bbc4e3fc7e546365f5dc7b9cefada8c9f 100644 (file)
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2010  IPFire Team                                             #
+# Copyright (C) 2010-2025  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -78,6 +78,7 @@ if ($timesettings{'ACTION'} eq $Lang::tr{'save'})
        if (!($timesettings{'UPDATE_VALUE'} =~ /^\d+$/) || $timesettings{'UPDATE_VALUE'} <= 0)
        {
                $errormessage = $Lang::tr{'invalid time period'};
+               $timesettings{'UPDATE_VALUE'} = 0;
                goto ERROR;
        }