bugfix: encode special characters in tunnel comment field

catch the tunnel comment field in perlfunc's read_post_data function where certain characters are changed to the html character entity in order to not interfere with the config files.
Tested with all kinds of crazy charcters such as: zdsfkh? <!@#$%^&*()> "quote"

Fixes #515
This commit is contained in:
Eric 2020-04-22 10:53:51 -07:00 committed by Joe AE6XE
parent 31c6669c2f
commit 1ace91aae2
1 changed files with 2 additions and 1 deletions

View File

@ -200,8 +200,9 @@ sub read_postdata
$line = fgets(10);
push(@parse_errors, "not blank: '$line'") unless $line eq "\r\n";
$line = fgets(1000);
if($parm =~ 'description_node') {
if(($parm =~ 'description_node') || ($parm =~ '_contact')) {
$line = substr($line, 0, 210);
$line =~ s/"/&quot;/g;
$line =~ s/'/&apos;/g;
$line =~ s/</&lt;/g;
$line =~ s/>/&gt;/g;