]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
gpl.cgi: Grab and GPLv3 license in pure perl.
authorStefan Schantl <stefan.schantl@ipfire.org>
Tue, 18 May 2021 17:38:02 +0000 (19:38 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 10 Jun 2021 13:30:56 +0000 (14:30 +0100)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
html/cgi-bin/gpl.cgi

index be1ea263900784f79c23a525943be7aeff4c7b55..140fd2178b2c4d5ee5135156748b50ab3f0642b5 100644 (file)
@@ -60,7 +60,19 @@ END
 ;      
 if ( -e "/usr/share/doc/licenses/GPLv3" ) {
        print '<textarea rows=\'25\' cols=\'75\' readonly=\'readonly\'>';
-       print `cat /usr/share/doc/licenses/GPLv3`;
+
+       # Open and read-in GPL file content.
+       open(FILE, "/usr/share/doc/licenses/GPLv3");
+
+       # Grab license.
+       my @license = <FILE>;
+
+       # Close filehandle.
+       close(FILE);
+
+       # Print license to textarea.
+       print "@license";
+
        print '</textarea>';
 }
 else {