add a bit of input sanitization

add install instructions
This commit is contained in:
2023-08-06 23:57:16 +02:00
parent 462ab68070
commit 932a46d096
2 changed files with 7 additions and 2 deletions

View File

@@ -31,7 +31,7 @@ else {
$turns = 0 ;
$winner = "" ;
$first = "" ;
$data = trim( $_POST["log"] ) ;
$data = htmlspecialchars(trim( $_POST["log"] ) ) ;
$data_ar = preg_split("/\r\n|\n|\r/", $data);
foreach ($data_ar as $line ) {
@@ -45,7 +45,7 @@ else {
$winner = $line_a[0] ;
}
if( preg_match( '/^Played <color=#[A-Z0-9]+>(.*)<\/color>/', $line, $match ) ) {
if( preg_match( '/^Played &lt;color=#[A-Z0-9]+&gt;(.*)&lt;\/color&gt;/', $line, $match ) ) {
guessExpansion( $match[1], $cards, $ext ) ;
}