From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: Re: [PATCH] connscheduler.cgi: Remove cleanhtml command from Remark Date: Thu, 07 Mar 2024 12:18:37 +0100 Message-ID: In-Reply-To: <55e772fb-9252-438a-a7a3-af634ac16426@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9191236903971748405==" List-Id: --===============9191236903971748405== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Michael, I think I know how to solve the problem. I tested out using HTML::Entities::encode_entities in a very simple Perl=20 program and found I got the same type of entity encoding as in the WUI=20 CGI pages. However, if I treated the string of characters as utf8 then the=20 HTML::Entities::encode_entities gave the results expected. So I need to figure out how to treat the remark strings as utf8 and=20 hopefully that should fix the problem. At least I have a view of a path=20 forward on this issue now, that will keep the protection of the=20 cleanhtml command while also allowing characters with diacritical marks,=20 plus special characters such as the Cyrillic alphabet and also things=20 like the german eszet that currently all get mangled. Will let you know how I get on. Additionally I will also later on create patches for the WUI CGI pages=20 for the Firewall Groups and for WIO as they do not use the cleanhtml=20 command at all yet they also have many Remark entries. I will also check=20 out the other WUI pages that don't use the cleanhtml command to see if=20 they have remarks etc that should use it. Regards, Adolf. On 06/03/2024 23:23, Adolf Belka wrote: > Hi Michael, > > On 06/03/2024 22:28, Michael Tremer wrote: >> Hello Adolf, >> >> I believe that I cannot merge these patches. > Then you need to also look back at the dns.cgi patch for the bug fix=20 > due to german umlauts being changed. The acceptance of that patch is=20 > what made me create these patches as they all had the same problem=20 > with remarks as well. If this can't be accepted as is then that patch=20 > needs to be reverted. > > https://git.ipfire.org/?p=3Dipfire-2.x.git;a=3Dcommit;h=3D7c6ff5ff12331a53f= 416080a44c8d6145e78bfac=20 > >> >> The reason simply is that it would create a store cross-site=20 >> scripting attack vector because someone could store some