Incorrect encoding of conditions
authorAlexander Ebert <ebert@woltlab.com>
Sat, 27 Jun 2020 09:41:29 +0000 (11:41 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 27 Jun 2020 09:41:29 +0000 (11:41 +0200)
wcfsetup/install/files/lib/system/condition/UserTrophyCondition.class.php
wcfsetup/install/files/lib/system/io/Tar.class.php

index a80ac69bc86b10892d7531575882863c202cf0b1..8d33b04a8bb374239196adbdb554e404e17290a8 100644 (file)
@@ -10,6 +10,7 @@ use wcf\data\DatabaseObjectList;
 use wcf\system\exception\UserInputException;
 use wcf\system\WCF;
 use wcf\util\ArrayUtil;
+use wcf\util\StringUtil;
 
 /**
  * Condition implementation for trophies.
@@ -150,7 +151,7 @@ HTML;
                $returnValue = "";
                foreach ($trophies as $trophy) {
                        /** @noinspection PhpVariableVariableInspection */
-                       $returnValue .= "<label><input type=\"checkbox\" name=\"".$identifier."[]\" value=\"".$trophy->trophyID."\"".(in_array($trophy->trophyID, $this->$identifier) ? ' checked' : "")."> ".$trophy->getTitle()."</label>";
+                       $returnValue .= "<label><input type=\"checkbox\" name=\"".$identifier."[]\" value=\"".$trophy->trophyID."\"".(in_array($trophy->trophyID, $this->$identifier) ? ' checked' : "")."> " . StringUtil::encodeHTML($trophy->getTitle()) . "</label>";
                }
                
                return $returnValue;
index 307044a3a5eabc392b3ca27cb8801232d9123ff8..792ba03620389a697eb996c4b93249e4ead4617b 100644 (file)
@@ -314,7 +314,7 @@ class Tar implements IArchive {
                $data = unpack($format, $binaryData);
                
                // Extract the properties
-               $header['checksum'] = octdec(trim($data['checksum']));
+               $header['checksum'] = @octdec(trim($data['checksum']));
                if ($header['checksum'] == $checksum) {
                        $header['filename'] = trim($data['filename']);
                        $header['mode'] = octdec(trim($data['mode']));