fireinfo.cgi: Fix read-in profile data.

To read-in the whole file content the data type needs to be an array.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
Stefan Schantl
2021-06-08 18:03:30 +02:00
committed by Michael Tremer
parent 276f938b09
commit 5153fcc9f1

View File

@@ -117,9 +117,8 @@ END
# Read pregenerated profile data
open(FILE, "/var/ipfire/fireinfo/profile");
my $profile = <FILE>;
my @profile = <FILE>;
close(FILE);
chomp($profile);
print "<form method='post' action='$ENV{'SCRIPT_NAME'}'>\n";
@@ -170,7 +169,7 @@ print <<END;
</tr>
<tr>
<td colspan='2'>
<textarea rows="25" cols="75" readonly="readonly">$profile</textarea>
<textarea rows="25" cols="75" readonly="readonly">@profile</textarea>
</td>
</tr>
</table>