]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
qos.cgi: Fixes bug 13885
authorAdolf Belka <adolf.belka@ipfire.org>
Thu, 25 Sep 2025 11:12:45 +0000 (13:12 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 25 Sep 2025 14:03:35 +0000 (14:03 +0000)
Fixes: bug 13885 - qos.cgi INC_SPD OUT_SPD DEFCLASS_INC DEFCLASS_OUT Stored Cross-Site Scripting
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/qos.cgi

index 52392be08eae9bc4f127afd971082e74909bdff9..8400bafdf77027ce50e4f0e66aa016ef0403f163 100644 (file)
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2022  IPFire Team  <info@ipfire.org>                     #
+# Copyright (C) 2007-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        #
@@ -671,6 +671,8 @@ END
 END
 ;
        if (($qossettings{'OUT_SPD'} ne '') && ($qossettings{'INC_SPD'} ne '')) {
+               $qossettings{'OUT_SPD'} = &Header::escape($qossettings{'OUT_SPD'});
+               $qossettings{'INC_SPD'} = &Header::escape($qossettings{'INC_SPD'});
                print <<END
     <form method='post' action='$ENV{'SCRIPT_NAME'}'>
          <table width='100%'>
@@ -683,6 +685,8 @@ END
 ;
        }
        if (($qossettings{'DEFCLASS_OUT'} ne '') && ($qossettings{'DEFCLASS_INC'} ne '')) {
+               $qossettings{'DEFCLASS_OUT'} = &Header::escape($qossettings{'DEFCLASS_OUT'});
+               $qossettings{'DEFCLASS_INC'} = &Header::escape($qossettings{'DEFCLASS_INC'});
                print <<END
                <form method='post' action='$ENV{'SCRIPT_NAME'}'>
                <table width='100%'>