]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
fireinfo.cgi: Fix read-in profile data.
authorStefan Schantl <stefan.schantl@ipfire.org>
Tue, 8 Jun 2021 16:03:30 +0000 (18:03 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 17 Jun 2021 20:11:37 +0000 (20:11 +0000)
To read-in the whole file content the data type needs to be an array.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
html/cgi-bin/fireinfo.cgi

index 99952be2ebb91ac7f0101e43e7bbd906e8ef90cd..e0221c5be71a2de3dd7d57a61a5debea842956c4 100644 (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>