mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
time.cgi: Fixes bug 13883
commit 8025aa78fb52933666e13a7e9e782edf4ddf8b42
Author: Adolf Belka <adolf.belka@ipfire.org>
Date: Thu Sep 25 13:12:43 2025 +0200
time.cgi: Fixes bug 13883
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>
commit f561899b54
Author: Jon Murphy <jon.murphy@ipfire.org>
Date: Mon Mar 11 18:45:00 2024 -0500
time.cgi: add current date-time to this WebGUI page
- added words and date-time format to english (en.pl)
- other languages are needed
- seconds included since time is accurate to < .1s
https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=2234e8aacac2e0d0b06dac4513585c15c2b3b440
Code-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Jon Murphy <jon.murphy@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -287,6 +288,10 @@ print <<END
|
||||
</table>
|
||||
END
|
||||
;
|
||||
|
||||
my $now = strftime($Lang::tr{'timeformat'}, localtime);
|
||||
print "<hr>$Lang::tr{'system time'}: $now";
|
||||
|
||||
&Header::closebox();
|
||||
&Header::openbox('100%',1,$Lang::tr{'ntp sync'});
|
||||
print <<END
|
||||
|
||||
Reference in New Issue
Block a user