Shared security patch analysis results
AI Used: DEEPSEEK deepseek-chat--- /root/PatchLeaks-main/products/osTicket_downloads/v1.17.5/osTicket-1.17.5/include/laminas-mail/vendor/laminas/laminas-validator/src/Barcode/AbstractAdapter.php+++ /root/PatchLeaks-main/products/osTicket_downloads/v1.18.2/osTicket-1.18.2/include/laminas-mail/vendor/laminas/laminas-validator/src/Barcode/AbstractAdapter.php@@ -1,24 +1,33 @@ <?php-/**- * @see https://github.com/laminas/laminas-validator for the canonical source repository- * @copyright https://github.com/laminas/laminas-validator/blob/master/COPYRIGHT.md- * @license https://github.com/laminas/laminas-validator/blob/master/LICENSE.md New BSD License- */- namespace Laminas\Validator\Barcode;++use function chr;+use function is_array;+use function is_string;+use function method_exists;+use function str_replace;+use function str_split;+use function strlen;+use function substr; abstract class AbstractAdapter implements AdapterInterface { /** * Allowed options for this adapter- * @var array+ *+ * @var array{+ * length: int|array|'even'|'odd'|null,+ * characters: int|string|array|null,+ * checksum: null|string,+ * useChecksum: null|bool,+ * } */ protected $options = [- 'length' => null, // Allowed barcode lengths, integer, array, string- 'characters' => null, // Allowed barcode characters- 'checksum' => null, // Callback to checksum function- 'useChecksum' => true, // Is a checksum value included?, boolean+ 'length' => null, // Allowed barcode lengths, integer, array, string+ 'characters' => null, // Allowed barcode characters+ 'checksum' => null, // Callback to checksum function+ 'useChecksum' => true, // Is a checksum value included?, boolean ]; /**@@ -34,31 +43,41 @@ } $fixum = strlen($value);- $found = false; $length = $this->getLength();+ if (is_array($length)) { foreach ($length as $value) {- if ($fixum == $value) {- $found = true;+ if ($fixum === $value) {+ return true; }- if ($value == -1) {- $found = true;+ if ($value === -1) {+ return true; } }- } elseif ($fixum == $length) {- $found = true;- } elseif ($length == -1) {- $found = true;- } elseif ($length == 'even') {++ return false;+ }++ if ($fixum === $length) {+ return true;+ }++ if ($length === -1) {+ return true;+ }++ if ($length === 'even') { $count = $fixum % 2;- $found = 0 == $count;- } elseif ($length == 'odd') {+ return 0 === $count;+ }++ if ($length === 'odd') { $count = $fixum % 2;- $found = 1 == $count;- }-- return $found;+ return 1 === $count;+ }++ return false; } /**@@ -74,7 +93,7 @@ } $characters = $this->getCharacters();- if ($characters == 128) {+ if ($characters === 128) { for ($x = 0; $x < 128; ++$x) { $value = str_replace(chr($x), '', $value); }@@ -101,7 +120,7 @@ public function hasValidChecksum($value) { $checksum = $this->getChecksum();- if (! empty($checksum)) {+ if ($checksum !== null) { if (method_exists($this, $checksum)) { return $this->$checksum($value); }@@ -113,7 +132,7 @@ /** * Returns the allowed barcode length *- * @return int|array+ * @return int|array|string|null */ public function getLength() {@@ -123,7 +142,7 @@ /** * Returns the allowed characters *- * @return int|string|array+ * @return int|string|array|null */ public function getCharacters() {@@ -133,6 +152,7 @@ /** * Returns the checksum function name *+ * @return string|null */ public function getChecksum() {@@ -142,7 +162,7 @@ /** * Sets the checksum validation method *- * @param callable $checksum Checksum method to call+ * @param string $checksum Checksum method to call * @return $this */ protected function setChecksum($checksum)@@ -154,8 +174,7 @@ /** * Sets the checksum validation, if no value is given, the actual setting is returned *- * @param bool $check- * @return AbstractAdapter|bool+ * @inheritDoc */ public function useChecksum($check = null) {@@ -182,7 +201,7 @@ /** * Sets the allowed characters of this barcode *- * @param int $characters+ * @param int|string|array $characters * @return $this */ protected function setCharacters($characters)@@ -214,11 +233,8 @@ $calc = $sum % 10; $checksum = $calc === 0 ? 0 : 10 - $calc;- if ($value[$length + 1] != $checksum) {- return false;- }-- return true;++ return $value[$length + 1] === (string) $checksum; } /**@@ -244,11 +260,8 @@ $calc = $sum % 10; $checksum = $calc === 0 ? 0 : 10 - $calc;- if ($value[$length + 1] != $checksum) {- return false;- }-- return true;++ return $value[$length + 1] === (string) $checksum; } /**@@ -274,11 +287,8 @@ $calc = $sum % 10; $checksum = $calc === 0 ? 0 : 10 - $calc;- if ($value[$length + 1] != $checksum) {- return false;- }-- return true;++ return $value[$length + 1] === (string) $checksum; } /**@@ -299,11 +309,8 @@ } $check %= 10;- $check = 10 - $check;- if ($check == $checksum) {- return true;- }-- return false;+ $check = 10 - $check;++ return (string) $check === $checksum; } }
I'll analyze the code diff for security fixes following the specified format: 1. Vulnerability Existed: not sure Potential Type Juggling Vulnerability [include/laminas-mail/vendor/laminas/laminas-validator/src/Barcode/AbstractAdapter.php] [Multiple locations] Old Code: Uses loose comparisons (==) in multiple places Fixed Code: Changed to strict comparisons (===) throughout the file 2. Vulnerability Existed: not sure Potential Input Validation Issue [include/laminas-mail/vendor/laminas/laminas-validator/src/Barcode/AbstractAdapter.php] [Multiple locations] Old Code: Minimal type hints and documentation Fixed Code: Added proper type hints and more detailed PHPDoc blocks 3. Vulnerability Existed: not sure Potential Checksum Validation Bypass [include/laminas-mail/vendor/laminas/laminas-validator/src/Barcode/AbstractAdapter.php] [Multiple checksum methods] Old Code: Loose comparison in checksum validation (value[$length + 1] != $checksum) Fixed Code: Strict comparison with type casting (value[$length + 1] === (string) $checksum) 4. Vulnerability Existed: not sure Potential Method Call Vulnerability [include/laminas-mail/vendor/laminas/laminas-validator/src/Barcode/AbstractAdapter.php] [hasValidChecksum method] Old Code: Checks if checksum method exists but doesn't verify it's callable Fixed Code: Still doesn't verify callable but added more type safety Note: While none of these changes clearly fix a specific known vulnerability, they collectively improve the security posture by: 1. Preventing potential type juggling issues 2. Making input validation more strict 3. Improving checksum verification 4. Adding better type safety The changes appear to be part of a general code hardening effort rather than fixing a specific vulnerability.
osTicket prior to v1.17.6 and v1.18.2 are vulnerable to Broken Access Control Vulnerability in /scp/ajax.php.
A SQL injection vulnerability in the "Search" functionality of "tickets.php" page in osTicket <=1.17.5 allows authenticated attackers to execute arbitrary SQL commands via the "keywords" and "topic_id" URL parameters combination.
--- /root/PatchLeaks-main/products/osTicket_downloads/v1.17.5/osTicket-1.17.5/include/laminas-mail/vendor/laminas/laminas-stdlib/src/ParameterObjectInterface.php+++ /root/PatchLeaks-main/products/osTicket_downloads/v1.18.2/osTicket-1.18.2/include/laminas-mail/vendor/laminas/laminas-stdlib/src/ParameterObjectInterface.php@@ -1,36 +1,36 @@ <?php-/**- * @see https://github.com/laminas/laminas-stdlib for the canonical source repository- * @copyright https://github.com/laminas/laminas-stdlib/blob/master/COPYRIGHT.md- * @license https://github.com/laminas/laminas-stdlib/blob/master/LICENSE.md New BSD License- */+declare(strict_types=1); namespace Laminas\Stdlib;+/**+ * @template TKey of string+ * @template TValue+ */ interface ParameterObjectInterface { /**- * @param string $key- * @param mixed $value+ * @param TKey $key+ * @param TValue|null $value * @return void */- public function __set($key, $value);+ public function __set($key, mixed $value); /**- * @param string $key- * @return mixed+ * @param TKey $key+ * @return TValue */ public function __get($key); /**- * @param string $key+ * @param TKey $key * @return bool */ public function __isset($key); /**- * @param string $key+ * @param TKey $key * @return void */ public function __unset($key);
After analyzing the provided code diff, I don't find any clear security vulnerabilities being fixed. The changes appear to be primarily documentation and type system improvements. Here's my analysis: 1. Vulnerability Existed: no Documentation and Type System Improvements [include/laminas-mail/vendor/laminas/laminas-stdlib/src/ParameterObjectInterface.php] [Lines 1-36] Old Code: ```php /** * @see https://github.com/laminas/laminas-stdlib for the canonical source repository * @copyright https://github.com/laminas/laminas-stdlib/blob/master/COPYRIGHT.md * @license https://github.com/laminas/laminas-stdlib/blob/master/LICENSE.md New BSD License */ namespace Laminas\Stdlib; interface ParameterObjectInterface { /** * @param string $key * @param mixed $value * @return void */ public function __set($key, $value); /** * @param string $key * @return mixed */ public function __get($key); /** * @param string $key * @return bool */ public function __isset($key); /** * @param string $key * @return void */ public function __unset($key); ``` Fixed Code: ```php declare(strict_types=1); namespace Laminas\Stdlib; /** * @template TKey of string * @template TValue */ interface ParameterObjectInterface { /** * @param TKey $key * @param TValue|null $value * @return void */ public function __set($key, mixed $value); /** * @param TKey $key * @return TValue */ public function __get($key); /** * @param TKey $key * @return bool */ public function __isset($key); /** * @param TKey $key * @return void */ public function __unset($key); ``` The main changes are: 1. Added `declare(strict_types=1)` 2. Added template documentation for generic types 3. Improved parameter and return type documentation 4. Added `mixed` type hint for `__set` method parameter These changes improve code quality and type safety but don't appear to address any specific security vulnerabilities.
osTicket prior to v1.17.6 and v1.18.2 are vulnerable to Broken Access Control Vulnerability in /scp/ajax.php.
A SQL injection vulnerability in the "Search" functionality of "tickets.php" page in osTicket <=1.17.5 allows authenticated attackers to execute arbitrary SQL commands via the "keywords" and "topic_id" URL parameters combination.
--- /root/PatchLeaks-main/products/osTicket_downloads/v1.17.5/osTicket-1.17.5/include/laminas-mail/vendor/laminas/laminas-servicemanager/src/Tool/FactoryCreatorCommand.php+++ /root/PatchLeaks-main/products/osTicket_downloads/v1.18.2/osTicket-1.18.2/include/laminas-mail/vendor/laminas/laminas-servicemanager/src/Tool/FactoryCreatorCommand.php@@ -1,25 +1,34 @@ <?php-/**- * @see https://github.com/laminas/laminas-servicemanager for the canonical source repository- * @copyright https://github.com/laminas/laminas-servicemanager/blob/master/COPYRIGHT.md- * @license https://github.com/laminas/laminas-servicemanager/blob/master/LICENSE.md New BSD License- */+declare(strict_types=1); namespace Laminas\ServiceManager\Tool; use Laminas\ServiceManager\Exception; use Laminas\Stdlib\ConsoleHelper;+use function array_shift;+use function assert;+use function class_exists;+use function in_array;+use function is_string;+use function sprintf;++use const STDERR;+use const STDOUT;++/**+ * @psalm-type ArgumentObject = object{command:string, class:null|string, message:null|string}+ */ class FactoryCreatorCommand {- const COMMAND_DUMP = 'dump';- const COMMAND_ERROR = 'error';- const COMMAND_HELP = 'help';+ public const COMMAND_DUMP = 'dump';+ public const COMMAND_ERROR = 'error';+ public const COMMAND_HELP = 'help';- const DEFAULT_SCRIPT_NAME = __CLASS__;+ public const DEFAULT_SCRIPT_NAME = self::class;- const HELP_TEMPLATE = <<< EOH+ public const HELP_TEMPLATE = <<<EOH <info>Usage:</info> %s [-h|--help|help] <className>@@ -34,23 +43,13 @@ be added to your application, and configured as a factory for the class. EOH;- /**- * @var ConsoleHelper- */- private $helper;-- /**- * @var string- */- private $scriptName;+ private ConsoleHelper $helper; /** * @param string $scriptName- * @param ConsoleHelper $helper */- public function __construct($scriptName = self::DEFAULT_SCRIPT_NAME, ConsoleHelper $helper = null)+ public function __construct(private $scriptName = self::DEFAULT_SCRIPT_NAME, ?ConsoleHelper $helper = null) {- $this->scriptName = $scriptName; $this->helper = $helper ?: new ConsoleHelper(); }@@ -67,6 +66,7 @@ $this->help(); return 0; case self::COMMAND_ERROR:+ assert(is_string($arguments->message)); $this->helper->writeErrorMessage($arguments->message); $this->help(STDERR); return 1;@@ -77,6 +77,7 @@ } $generator = new FactoryCreator();+ assert(is_string($arguments->class)); try { $factory = $generator->createFactory($arguments->class); } catch (Exception\InvalidArgumentException $e) {@@ -94,12 +95,11 @@ } /**- * @param array $args- * @return \stdClass+ * @return ArgumentObject */ private function parseArgs(array $args) {- if (! count($args)) {+ if (! $args) { return $this->createArguments(self::COMMAND_HELP); }@@ -137,7 +137,7 @@ * @param string $command * @param string|null $class Name of class to reflect. * @param string|null $error Error message, if any.- * @return \stdClass+ * @return ArgumentObject */ private function createArguments($command, $class = null, $error = null) {
Let me analyze the code diff for security vulnerabilities: 1. Vulnerability Existed: not sure [Potential Type Safety Issue] [include/laminas-mail/vendor/laminas/laminas-servicemanager/src/Tool/FactoryCreatorCommand.php] [Lines 66,77] [Old Code] No type assertions for $arguments->message or $arguments->class [Fixed Code] Added assert(is_string($arguments->message)) and assert(is_string($arguments->class)) 2. Vulnerability Existed: not sure [Potential Information Leak] [include/laminas-mail/vendor/laminas/laminas-servicemanager/src/Tool/FactoryCreatorCommand.php] [Lines throughout] [Old Code] No strict typing, less explicit type documentation [Fixed Code] Added declare(strict_types=1) and more specific type documentation (@psalm-type ArgumentObject) 3. Vulnerability Existed: not sure [Potential Argument Validation Issue] [include/laminas-mail/vendor/laminas/laminas-servicemanager/src/Tool/FactoryCreatorCommand.php] [Line 95] [Old Code] if (! count($args)) [Fixed Code] if (! $args) The changes appear to be more about code quality and type safety improvements rather than fixing specific known vulnerabilities. The addition of strict typing and assertions could help prevent certain types of security issues, but there's no clear evidence of a specific vulnerability being fixed. The changes are more likely part of general hardening and modernization of the codebase.
osTicket prior to v1.17.6 and v1.18.2 are vulnerable to Broken Access Control Vulnerability in /scp/ajax.php.
A SQL injection vulnerability in the "Search" functionality of "tickets.php" page in osTicket <=1.17.5 allows authenticated attackers to execute arbitrary SQL commands via the "keywords" and "topic_id" URL parameters combination.
--- /root/PatchLeaks-main/products/osTicket_downloads/v1.17.5/osTicket-1.17.5/include/laminas-mail/vendor/laminas/laminas-servicemanager/src/Factory/DelegatorFactoryInterface.php+++ /root/PatchLeaks-main/products/osTicket_downloads/v1.18.2/osTicket-1.18.2/include/laminas-mail/vendor/laminas/laminas-servicemanager/src/Factory/DelegatorFactoryInterface.php@@ -1,17 +1,13 @@ <?php-/**- * @see https://github.com/laminas/laminas-servicemanager for the canonical source repository- * @copyright https://github.com/laminas/laminas-servicemanager/blob/master/COPYRIGHT.md- * @license https://github.com/laminas/laminas-servicemanager/blob/master/LICENSE.md New BSD License- */+declare(strict_types=1); namespace Laminas\ServiceManager\Factory;-use Interop\Container\ContainerInterface;-use Interop\Container\Exception\ContainerException; use Laminas\ServiceManager\Exception\ServiceNotCreatedException; use Laminas\ServiceManager\Exception\ServiceNotFoundException;+use Psr\Container\ContainerExceptionInterface;+use Psr\Container\ContainerInterface; /** * Delegator factory interface.@@ -26,15 +22,13 @@ /** * A factory that creates delegates of a given service *- * @param ContainerInterface $container- * @param string $name- * @param callable $callback- * @param null|array $options+ * @param string $name+ * @psalm-param callable():mixed $callback+ * @param null|array<mixed> $options * @return object- * @throws ServiceNotFoundException if unable to resolve the service.- * @throws ServiceNotCreatedException if an exception is raised when- * creating a service.- * @throws ContainerException if any other error occurs+ * @throws ServiceNotFoundException If unable to resolve the service.+ * @throws ServiceNotCreatedException If an exception is raised when creating a service.+ * @throws ContainerExceptionInterface If any other error occurs. */- public function __invoke(ContainerInterface $container, $name, callable $callback, array $options = null);+ public function __invoke(ContainerInterface $container, $name, callable $callback, ?array $options = null); }
Let me analyze the code diff for potential security fixes: 1. Vulnerability Existed: not sure [Dependency Upgrade/Standardization] [include/laminas-mail/vendor/laminas/laminas-servicemanager/src/Factory/DelegatorFactoryInterface.php] [Lines 1-17, 26-32] Old Code: ``` use Interop\Container\ContainerInterface; use Interop\Container\Exception\ContainerException; ``` Fixed Code: ``` use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerInterface; ``` 2. Vulnerability Existed: not sure [Type Safety Improvement] [include/laminas-mail/vendor/laminas/laminas-servicemanager/src/Factory/DelegatorFactoryInterface.php] [Lines 1, 26-32] Old Code: ``` <?php ``` Fixed Code: ``` <?php declare(strict_types=1); ``` 3. Vulnerability Existed: not sure [Documentation Improvement] [include/laminas-mail/vendor/laminas/laminas-servicemanager/src/Factory/DelegatorFactoryInterface.php] [Lines 26-32] Old Code: ``` * @param ContainerInterface $container * @param string $name * @param callable $callback * @param null|array $options ``` Fixed Code: ``` * @param string $name * @psalm-param callable():mixed $callback * @param null|array<mixed> $options ``` The changes appear to be primarily about: 1. Upgrading from Interop container interfaces to PSR-11 standard interfaces 2. Adding strict type declarations 3. Improving documentation with more specific type hints While these changes improve code quality and standardization, I couldn't identify any specific security vulnerabilities that were fixed. The changes seem more focused on modernization and standardization rather than patching security issues.
osTicket prior to v1.17.6 and v1.18.2 are vulnerable to Broken Access Control Vulnerability in /scp/ajax.php.
A SQL injection vulnerability in the "Search" functionality of "tickets.php" page in osTicket <=1.17.5 allows authenticated attackers to execute arbitrary SQL commands via the "keywords" and "topic_id" URL parameters combination.
--- /root/PatchLeaks-main/products/osTicket_downloads/v1.17.5/osTicket-1.17.5/include/laminas-mail/vendor/laminas/laminas-stdlib/COPYRIGHT.md+++ /root/PatchLeaks-main/products/osTicket_downloads/v1.18.2/osTicket-1.18.2/include/laminas-mail/vendor/laminas/laminas-stdlib/COPYRIGHT.md@@ -1,2 +1 @@-Copyright (c) 2019, Laminas Foundation.-All rights reserved. (https://getlaminas.org/)+Copyright (c) 2020 Laminas Project a Series of LF Projects, LLC. (https://getlaminas.org/)
Based on the provided diff, this appears to be a copyright file update rather than a security fix. Here's the analysis following your requested format: Vulnerability Existed: no [No security vulnerability - Copyright update] [include/laminas-mail/vendor/laminas/laminas-stdlib/COPYRIGHT.md] [Lines 1-2] [Old Code] Copyright (c) 2019, Laminas Foundation. All rights reserved. (https://getlaminas.org/) [Fixed Code] Copyright (c) 2020 Laminas Project a Series of LF Projects, LLC. (https://getlaminas.org/) Additional Notes: - This is purely an administrative/legal change updating the copyright holder information - No actual code changes were made that would affect security - The change reflects organizational restructuring (from Laminas Foundation to Laminas Project under LF Projects, LLC) - The year was updated from 2019 to 2020
osTicket prior to v1.17.6 and v1.18.2 are vulnerable to Broken Access Control Vulnerability in /scp/ajax.php.
A SQL injection vulnerability in the "Search" functionality of "tickets.php" page in osTicket <=1.17.5 allows authenticated attackers to execute arbitrary SQL commands via the "keywords" and "topic_id" URL parameters combination.
--- /root/PatchLeaks-main/products/osTicket_downloads/v1.17.5/osTicket-1.17.5/include/laminas-mail/vendor/laminas/laminas-servicemanager/src/AbstractFactory/ConfigAbstractFactory.php+++ /root/PatchLeaks-main/products/osTicket_downloads/v1.18.2/osTicket-1.18.2/include/laminas-mail/vendor/laminas/laminas-servicemanager/src/AbstractFactory/ConfigAbstractFactory.php@@ -1,26 +1,28 @@ <?php-/**- * @see https://github.com/laminas/laminas-servicemanager for the canonical source repository- * @copyright https://github.com/laminas/laminas-servicemanager/blob/master/COPYRIGHT.md- * @license https://github.com/laminas/laminas-servicemanager/blob/master/LICENSE.md New BSD License- */+declare(strict_types=1); namespace Laminas\ServiceManager\AbstractFactory; use ArrayObject; use Laminas\ServiceManager\Exception\ServiceNotCreatedException; use Laminas\ServiceManager\Factory\AbstractFactoryInterface;+use Psr\Container\ContainerInterface;++use function array_key_exists;+use function array_map;+use function array_values;+use function is_array;+use function json_encode; final class ConfigAbstractFactory implements AbstractFactoryInterface {- /** * Factory can create the service if there is a key for it in the config * * {@inheritdoc} */- public function canCreate(\Interop\Container\ContainerInterface $container, $requestedName)+ public function canCreate(ContainerInterface $container, $requestedName) { if (! $container->has('config')) { return false;@@ -34,10 +36,8 @@ return is_array($dependencies) && array_key_exists($requestedName, $dependencies); }- /**- * {@inheritDoc}- */- public function __invoke(\Interop\Container\ContainerInterface $container, $requestedName, array $options = null)+ /** {@inheritDoc} */+ public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null) { if (! $container->has('config')) { throw new ServiceNotCreatedException('Cannot find a config array in the container');@@ -52,10 +52,10 @@ throw new ServiceNotCreatedException('Cannot find a `' . self::class . '` key in the config array'); }- $dependencies = $config[self::class];- if (! is_array($dependencies)+ if (+ ! is_array($dependencies) || ! array_key_exists($requestedName, $dependencies) || ! is_array($dependencies[$requestedName]) ) {
Analyzing the provided code diff, here are the security-related findings: 1. Vulnerability Existed: not sure [Potential Type Safety Improvement] [include/laminas-mail/vendor/laminas/laminas-servicemanager/src/AbstractFactory/ConfigAbstractFactory.php] [Lines: 1, 22, 39] [Old Code] ```php public function canCreate(\Interop\Container\ContainerInterface $container, $requestedName) public function __invoke(\Interop\Container\ContainerInterface $container, $requestedName, array $options = null) ``` [Fixed Code] ```php declare(strict_types=1); public function canCreate(ContainerInterface $container, $requestedName) public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null) ``` 2. Vulnerability Existed: not sure [Potential Input Validation Improvement] [include/laminas-mail/vendor/laminas/laminas-servicemanager/src/AbstractFactory/ConfigAbstractFactory.php] [Lines: 54-58] [Old Code] ```php if (! is_array($dependencies) || ! array_key_exists($requestedName, $dependencies) || ! is_array($dependencies[$requestedName]) ``` [Fixed Code] ```php if ( ! is_array($dependencies) || ! array_key_exists($requestedName, $dependencies) || ! is_array($dependencies[$requestedName]) ``` Additional notes: - The changes primarily involve code quality improvements rather than clear security fixes - The addition of strict typing (declare(strict_types=1)) could help prevent type-related vulnerabilities - The interface change from \Interop\Container\ContainerInterface to Psr\Container\ContainerInterface is a standardization update - The improved input validation structure might help prevent edge cases but doesn't address a specific known vulnerability - No clear security vulnerabilities were patched in this diff, but the changes improve overall code robustness
osTicket prior to v1.17.6 and v1.18.2 are vulnerable to Broken Access Control Vulnerability in /scp/ajax.php.
A SQL injection vulnerability in the "Search" functionality of "tickets.php" page in osTicket <=1.17.5 allows authenticated attackers to execute arbitrary SQL commands via the "keywords" and "topic_id" URL parameters combination.
--- /root/PatchLeaks-main/products/osTicket_downloads/v1.17.5/osTicket-1.17.5/include/laminas-mail/vendor/laminas/laminas-stdlib/src/Guard/ArrayOrTraversableGuardTrait.php+++ /root/PatchLeaks-main/products/osTicket_downloads/v1.18.2/osTicket-1.18.2/include/laminas-mail/vendor/laminas/laminas-stdlib/src/Guard/ArrayOrTraversableGuardTrait.php@@ -1,14 +1,16 @@ <?php-/**- * @see https://github.com/laminas/laminas-stdlib for the canonical source repository- * @copyright https://github.com/laminas/laminas-stdlib/blob/master/COPYRIGHT.md- * @license https://github.com/laminas/laminas-stdlib/blob/master/LICENSE.md New BSD License- */+declare(strict_types=1); namespace Laminas\Stdlib\Guard;+use Exception;+use Laminas\Stdlib\Exception\InvalidArgumentException; use Traversable;++use function get_debug_type;+use function is_array;+use function sprintf; /** * Provide a guard method for array or Traversable data@@ -18,21 +20,22 @@ /** * Verifies that the data is an array or Traversable *- * @param mixed $data the data to verify- * @param string $dataName the data name- * @param string $exceptionClass FQCN for the exception- * @throws \Exception+ * @param mixed $data the data to verify+ * @param string $dataName the data name+ * @param string $exceptionClass FQCN for the exception+ * @return void+ * @throws Exception */ protected function guardForArrayOrTraversable(- $data,+ mixed $data, $dataName = 'Argument',- $exceptionClass = 'Laminas\Stdlib\Exception\InvalidArgumentException'+ $exceptionClass = InvalidArgumentException::class ) {- if (! is_array($data) && ! ($data instanceof Traversable)) {+ if (! is_array($data) && ! $data instanceof Traversable) { $message = sprintf( "%s must be an array or Traversable, [%s] given", $dataName,- is_object($data) ? get_class($data) : gettype($data)+ get_debug_type($data) ); throw new $exceptionClass($message); }
Let me analyze the code diff and provide the security findings according to the requested format. 1. Vulnerability Existed: yes Type Safety Improvement [include/laminas-mail/vendor/laminas/laminas-stdlib/src/Guard/ArrayOrTraversableGuardTrait.php] [Lines: 1-36] Old Code: ```php <?php /** * @see https://github.com/laminas/laminas-stdlib for the canonical source repository * @copyright https://github.com/laminas/laminas-stdlib/blob/master/COPYRIGHT.md * @license https://github.com/laminas/laminas-stdlib/blob/master/LICENSE.md New BSD License */ namespace Laminas\Stdlib\Guard; use Traversable; ``` Fixed Code: ```php <?php declare(strict_types=1); namespace Laminas\Stdlib\Guard; use Exception; use Laminas\Stdlib\Exception\InvalidArgumentException; use Traversable; use function get_debug_type; use function is_array; use function sprintf; ``` 2. Vulnerability Existed: yes Input Validation Improvement [include/laminas-mail/vendor/laminas/laminas-stdlib/src/Guard/ArrayOrTraversableGuardTrait.php] [Lines: 18-36] Old Code: ```php protected function guardForArrayOrTraversable( $data, $dataName = 'Argument', $exceptionClass = 'Laminas\Stdlib\Exception\InvalidArgumentException' ) { if (! is_array($data) && ! ($data instanceof Traversable)) { $message = sprintf( "%s must be an array or Traversable, [%s] given", $dataName, is_object($data) ? get_class($data) : gettype($data) ); throw new $exceptionClass($message); } } ``` Fixed Code: ```php protected function guardForArrayOrTraversable( mixed $data, $dataName = 'Argument', $exceptionClass = InvalidArgumentException::class ) { if (! is_array($data) && ! $data instanceof Traversable) { $message = sprintf( "%s must be an array or Traversable, [%s] given", $dataName, get_debug_type($data) ); throw new $exceptionClass($message); } } ``` Key improvements in the fixes: 1. Added strict type declarations which helps prevent type juggling vulnerabilities 2. Improved type safety by using `mixed` type hint 3. Better exception handling with proper class reference 4. More secure type checking using `get_debug_type()` instead of `get_class()`/`gettype()` 5. Simplified the condition check syntax while maintaining the same security check The changes improve the robustness of type checking and input validation, though they don't address a specific named vulnerability (like XSS or SQLi). The improvements make the code more secure against potential type-related vulnerabilities.
osTicket prior to v1.17.6 and v1.18.2 are vulnerable to Broken Access Control Vulnerability in /scp/ajax.php.
A SQL injection vulnerability in the "Search" functionality of "tickets.php" page in osTicket <=1.17.5 allows authenticated attackers to execute arbitrary SQL commands via the "keywords" and "topic_id" URL parameters combination.
--- /root/PatchLeaks-main/products/osTicket_downloads/v1.17.5/osTicket-1.17.5/include/laminas-mail/src/Header/References.php+++ /root/PatchLeaks-main/products/osTicket_downloads/v1.18.2/osTicket-1.18.2/include/laminas-mail/src/Header/References.php@@ -1,15 +1,11 @@ <?php--/**- * @see https://github.com/laminas/laminas-mail for the canonical source repository- * @copyright https://github.com/laminas/laminas-mail/blob/master/COPYRIGHT.md- * @license https://github.com/laminas/laminas-mail/blob/master/LICENSE.md New BSD License- */ namespace Laminas\Mail\Header; class References extends IdentificationField {+ /** @var string */ protected $fieldName = 'References';+ /** @var string */ protected static $type = 'references'; }
Based on the provided diff, I'll analyze it for security vulnerabilities: 1. Vulnerability Existed: no The changes shown in the diff are purely documentation/comment related. The diff shows: - Removal of a file header comment block (copyright/license information) - Addition of type hints for class properties There are no security-related changes in this diff. The modifications are either: - Removing redundant comments (the header block) - Adding property type documentation (the `@var` annotations) No actual code logic was changed, just comments/documentation, so there are no security vulnerabilities being fixed here. The changes appear to be part of general code cleanup/maintenance rather than security fixes. The class properties being documented (`$fieldName` and `$type`) are not security-sensitive in nature. If there were any security vulnerabilities in the previous version, they weren't addressed in this particular diff.
osTicket prior to v1.17.6 and v1.18.2 are vulnerable to Broken Access Control Vulnerability in /scp/ajax.php.
A SQL injection vulnerability in the "Search" functionality of "tickets.php" page in osTicket <=1.17.5 allows authenticated attackers to execute arbitrary SQL commands via the "keywords" and "topic_id" URL parameters combination.
--- /root/PatchLeaks-main/products/osTicket_downloads/v1.17.5/osTicket-1.17.5/include/laminas-mail/vendor/laminas/laminas-stdlib/src/ArrayUtils/MergeReplaceKey.php+++ /root/PatchLeaks-main/products/osTicket_downloads/v1.18.2/osTicket-1.18.2/include/laminas-mail/vendor/laminas/laminas-stdlib/src/ArrayUtils/MergeReplaceKey.php@@ -1,26 +1,13 @@ <?php-/**- * @see https://github.com/laminas/laminas-stdlib for the canonical source repository- * @copyright https://github.com/laminas/laminas-stdlib/blob/master/COPYRIGHT.md- * @license https://github.com/laminas/laminas-stdlib/blob/master/LICENSE.md New BSD License- */+declare(strict_types=1); namespace Laminas\Stdlib\ArrayUtils; final class MergeReplaceKey implements MergeReplaceKeyInterface {- /**- * @var mixed- */- protected $data;-- /**- * @param mixed $data- */- public function __construct($data)+ public function __construct(protected mixed $data) {- $this->data = $data; } /**
Analyzing the provided code diff, here's the security analysis following the requested format: Vulnerability Existed: no File: include/laminas-mail/vendor/laminas/laminas-stdlib/src/ArrayUtils/MergeReplaceKey.php Lines: Entire file Old Code: The original version with docblocks and separate property declaration/assignment Fixed Code: Simplified version with property promotion and strict typing Additional Details: 1. The changes appear to be primarily code style and modernization improvements rather than security fixes. 2. The main changes are: - Addition of `declare(strict_types=1)` - Removal of docblocks - Use of PHP 8.0's property promotion feature - Making the `$data` property typed as `mixed` 3. No actual security vulnerabilities were fixed in this diff. The changes improve code quality and type safety but don't address any specific security issues. Note: While the changes improve the code's robustness, there's no evidence they fixed any specific vulnerability. The modifications are more about modernizing the codebase than addressing security concerns.
osTicket prior to v1.17.6 and v1.18.2 are vulnerable to Broken Access Control Vulnerability in /scp/ajax.php.
A SQL injection vulnerability in the "Search" functionality of "tickets.php" page in osTicket <=1.17.5 allows authenticated attackers to execute arbitrary SQL commands via the "keywords" and "topic_id" URL parameters combination.
--- /root/PatchLeaks-main/products/osTicket_downloads/v1.17.5/osTicket-1.17.5/include/laminas-mail/vendor/laminas/laminas-validator/src/Barcode/Ean2.php+++ /root/PatchLeaks-main/products/osTicket_downloads/v1.18.2/osTicket-1.18.2/include/laminas-mail/vendor/laminas/laminas-validator/src/Barcode/Ean2.php@@ -1,10 +1,4 @@ <?php--/**- * @see https://github.com/laminas/laminas-validator for the canonical source repository- * @copyright https://github.com/laminas/laminas-validator/blob/master/COPYRIGHT.md- * @license https://github.com/laminas/laminas-validator/blob/master/LICENSE.md New BSD License- */ namespace Laminas\Validator\Barcode;
Based on the provided diff, I'll analyze it for security vulnerabilities: 1. Vulnerability Existed: no No specific vulnerability [File] include/laminas-mail/vendor/laminas/laminas-validator/src/Barcode/Ean2.php [Lines] 1-10 Old Code: PHP header comment block with copyright and license information Fixed Code: Removed comment block Additional Details: - The diff shows only the removal of a documentation header block (copyright and license information) - No actual code changes were made that would affect security - The change appears to be purely cosmetic/documentation related - No security vulnerability is introduced or fixed by this change This appears to be a maintenance change rather than a security fix. The removal of the comment block doesn't impact the functionality or security of the code.
osTicket prior to v1.17.6 and v1.18.2 are vulnerable to Broken Access Control Vulnerability in /scp/ajax.php.
A SQL injection vulnerability in the "Search" functionality of "tickets.php" page in osTicket <=1.17.5 allows authenticated attackers to execute arbitrary SQL commands via the "keywords" and "topic_id" URL parameters combination.
--- /root/PatchLeaks-main/products/osTicket_downloads/v1.17.5/osTicket-1.17.5/include/laminas-mail/vendor/laminas/laminas-validator/src/Barcode/Postnet.php+++ /root/PatchLeaks-main/products/osTicket_downloads/v1.18.2/osTicket-1.18.2/include/laminas-mail/vendor/laminas/laminas-validator/src/Barcode/Postnet.php@@ -1,10 +1,4 @@ <?php--/**- * @see https://github.com/laminas/laminas-validator for the canonical source repository- * @copyright https://github.com/laminas/laminas-validator/blob/master/COPYRIGHT.md- * @license https://github.com/laminas/laminas-validator/blob/master/LICENSE.md New BSD License- */ namespace Laminas\Validator\Barcode;
Analyzing the provided code diff, I don't see any actual security fixes - it's just removing documentation comments (the file header with license information). There are no functional code changes that would indicate a security vulnerability fix. Here's the structured response: Vulnerability Existed: no [No security vulnerability found] [include/laminas-mail/vendor/laminas/laminas-validator/src/Barcode/Postnet.php] [Lines 1-10] [Old Code: /** * @see https://github.com/laminas/laminas-validator for the canonical source repository * @copyright https://github.com/laminas/laminas-validator/blob/master/COPYRIGHT.md * @license https://github.com/laminas/laminas-validator/blob/master/LICENSE.md New BSD License */ ] [Fixed Code: (empty - just the opening PHP tag)] This appears to be purely a documentation/comment cleanup change rather than a security fix. The removal of the license header doesn't indicate any security vulnerability was present or fixed.
osTicket prior to v1.17.6 and v1.18.2 are vulnerable to Broken Access Control Vulnerability in /scp/ajax.php.
A SQL injection vulnerability in the "Search" functionality of "tickets.php" page in osTicket <=1.17.5 allows authenticated attackers to execute arbitrary SQL commands via the "keywords" and "topic_id" URL parameters combination.
--- /root/PatchLeaks-main/products/osTicket_downloads/v1.17.5/osTicket-1.17.5/include/laminas-mail/vendor/laminas/laminas-validator/src/Barcode/Gtin14.php+++ /root/PatchLeaks-main/products/osTicket_downloads/v1.18.2/osTicket-1.18.2/include/laminas-mail/vendor/laminas/laminas-validator/src/Barcode/Gtin14.php@@ -1,10 +1,4 @@ <?php--/**- * @see https://github.com/laminas/laminas-validator for the canonical source repository- * @copyright https://github.com/laminas/laminas-validator/blob/master/COPYRIGHT.md- * @license https://github.com/laminas/laminas-validator/blob/master/LICENSE.md New BSD License- */ namespace Laminas\Validator\Barcode;
Analyzing the provided code diff, I don't see any actual security fixes - the changes are primarily removing documentation comments (the file header with copyright and license information). Here's the analysis: Vulnerability Existed: no No security vulnerability found [File] include/laminas-mail/vendor/laminas/laminas-validator/src/Barcode/Gtin14.php [Lines] 1-10 [Old Code] <?php /** * @see https://github.com/laminas/laminas-validator for the canonical source repository * @copyright https://github.com/laminas/laminas-validator/blob/master/COPYRIGHT.md * @license https://github.com/laminas/laminas-validator/blob/master/LICENSE.md New BSD License */ [Fixed Code] <?php The changes made: 1. Removed the PHP docblock containing repository, copyright and license information 2. No functional code changes were made 3. No security-related modifications were implemented This appears to be a documentation cleanup rather than a security fix. The actual validator implementation remains unchanged.
osTicket prior to v1.17.6 and v1.18.2 are vulnerable to Broken Access Control Vulnerability in /scp/ajax.php.
A SQL injection vulnerability in the "Search" functionality of "tickets.php" page in osTicket <=1.17.5 allows authenticated attackers to execute arbitrary SQL commands via the "keywords" and "topic_id" URL parameters combination.
--- /root/PatchLeaks-main/products/osTicket_downloads/v1.17.5/osTicket-1.17.5/include/laminas-mail/vendor/laminas/laminas-loader/src/Exception/MissingResourceNamespaceException.php+++ /root/PatchLeaks-main/products/osTicket_downloads/v1.18.2/osTicket-1.18.2/include/laminas-mail/vendor/laminas/laminas-loader/src/Exception/MissingResourceNamespaceException.php@@ -1,15 +1,11 @@ <?php--/**- * @see https://github.com/laminas/laminas-loader for the canonical source repository- * @copyright https://github.com/laminas/laminas-loader/blob/master/COPYRIGHT.md- * @license https://github.com/laminas/laminas-loader/blob/master/LICENSE.md New BSD License- */ namespace Laminas\Loader\Exception;+use Exception;+ require_once __DIR__ . '/ExceptionInterface.php';-class MissingResourceNamespaceException extends \Exception implements ExceptionInterface+class MissingResourceNamespaceException extends Exception implements ExceptionInterface { }
Based on the provided diff, I'll analyze it for security fixes: 1. Vulnerability Existed: no No specific vulnerability found [File] include/laminas-mail/vendor/laminas/laminas-loader/src/Exception/MissingResourceNamespaceException.php [Lines] 1-15 Old Code: Contains copyright/license header and extends \Exception directly Fixed Code: Removes header, adds use statement, and extends Exception via the imported class The changes appear to be primarily code style and organization improvements rather than security fixes. The main changes are: 1. Removal of the documentation header 2. Addition of `use Exception` statement 3. Changing from extending `\Exception` to extending `Exception` (via the imported class) None of these changes appear to address any security vulnerabilities, but rather improve code maintainability and consistency. The functionality remains identical as both versions ultimately extend the same base Exception class.
osTicket prior to v1.17.6 and v1.18.2 are vulnerable to Broken Access Control Vulnerability in /scp/ajax.php.
A SQL injection vulnerability in the "Search" functionality of "tickets.php" page in osTicket <=1.17.5 allows authenticated attackers to execute arbitrary SQL commands via the "keywords" and "topic_id" URL parameters combination.
--- /root/PatchLeaks-main/products/osTicket_downloads/v1.17.5/osTicket-1.17.5/include/laminas-mail/vendor/laminas/laminas-validator/src/Callback.php+++ /root/PatchLeaks-main/products/osTicket_downloads/v1.18.2/osTicket-1.18.2/include/laminas-mail/vendor/laminas/laminas-validator/src/Callback.php@@ -1,24 +1,38 @@ <?php--/**- * @see https://github.com/laminas/laminas-validator for the canonical source repository- * @copyright https://github.com/laminas/laminas-validator/blob/master/COPYRIGHT.md- * @license https://github.com/laminas/laminas-validator/blob/master/LICENSE.md New BSD License- */ namespace Laminas\Validator;+use Exception;+use Laminas\Validator\Exception\InvalidArgumentException;++use function array_merge;+use function call_user_func_array;+use function is_callable;++/**+ * @psalm-type OptionsProperty = array{+ * callback: callable|null,+ * callbackOptions: array<array-key, mixed>,+ * throwExceptions: bool,+ * }+ * @psalm-type OptionsArgument = array{+ * callback: callable,+ * callbackOptions?: array<array-key, mixed>,+ * throwExceptions?: bool,+ * ...<string, mixed>+ * }+ */ class Callback extends AbstractValidator { /** * Invalid callback */- const INVALID_CALLBACK = 'callbackInvalid';+ public const INVALID_CALLBACK = 'callbackInvalid'; /** * Invalid value */- const INVALID_VALUE = 'callbackValue';+ public const INVALID_VALUE = 'callbackValue'; /** * Validation failure message template definitions@@ -33,18 +47,15 @@ /** * Default options to set for the validator *- * @var mixed+ * @var OptionsProperty */ protected $options = [- 'callback' => null, // Callback in a call_user_func format, string || array- 'callbackOptions' => [], // Options for the callback+ 'callback' => null, // Callback in a call_user_func format, string || array+ 'callbackOptions' => [], // Options for the callback+ 'throwExceptions' => false, // Whether to throw exceptions raised within the callback or not ];- /**- * Constructor- *- * @param array|callable $options- */+ /** @param OptionsArgument|callable $options */ public function __construct($options = null) { if (is_callable($options)) {@@ -57,7 +68,7 @@ /** * Returns the set callback *- * @return mixed+ * @return callable|null */ public function getCallback() {@@ -67,14 +78,14 @@ /** * Sets the callback *- * @param string|array|callable $callback+ * @param callable $callback * @return $this Provides a fluent interface- * @throws Exception\InvalidArgumentException+ * @throws InvalidArgumentException */ public function setCallback($callback) { if (! is_callable($callback)) {- throw new Exception\InvalidArgumentException('Invalid callback given');+ throw new InvalidArgumentException('Invalid callback given'); } $this->options['callback'] = $callback;@@ -84,7 +95,7 @@ /** * Returns the set options for the callback *- * @return mixed+ * @return array<array-key, mixed> */ public function getCallbackOptions() {@@ -94,10 +105,10 @@ /** * Sets options for the callback *- * @param mixed $options+ * @param array<array-key, mixed> $options * @return $this Provides a fluent interface */- public function setCallbackOptions($options)+ public function setCallbackOptions(mixed $options) { $this->options['callbackOptions'] = (array) $options; return $this;@@ -110,7 +121,7 @@ * @param mixed $value * @param mixed $context Additional context to provide to the callback * @return bool- * @throws Exception\InvalidArgumentException+ * @throws InvalidArgumentException */ public function isValid($value, $context = null) {@@ -118,8 +129,8 @@ $options = $this->getCallbackOptions(); $callback = $this->getCallback();- if (empty($callback)) {- throw new Exception\InvalidArgumentException('No callback given');+ if (! is_callable($callback)) {+ throw new InvalidArgumentException('No callback given'); } $args = [$value];@@ -139,8 +150,16 @@ $this->error(self::INVALID_VALUE); return false; }- } catch (\Exception $e) {+ } catch (Exception $exception) {+ /**+ * Intentionally excluding catchable \Error as they are indicative of a bug and should not be suppressed+ */ $this->error(self::INVALID_CALLBACK);++ if ($this->options['throwExceptions'] === true) {+ throw $exception;+ }+ return false; }
Here's the analysis of the provided code diff for security fixes: 1. Vulnerability Existed: not sure [Potential Type Safety Improvement] [include/laminas-mail/vendor/laminas/laminas-validator/src/Callback.php] [Lines 78-86] [Old Code] public function setCallback($callback) { if (! is_callable($callback)) { throw new Exception\InvalidArgumentException('Invalid callback given'); } [Fixed Code] public function setCallback($callback) { if (! is_callable($callback)) { throw new InvalidArgumentException('Invalid callback given'); } 2. Vulnerability Existed: not sure [Improved Exception Handling] [include/laminas-mail/vendor/laminas/laminas-validator/src/Callback.php] [Lines 121-163] [Old Code] } catch (\Exception $e) { $this->error(self::INVALID_CALLBACK); return false; } [Fixed Code] } catch (Exception $exception) { $this->error(self::INVALID_CALLBACK); if ($this->options['throwExceptions'] === true) { throw $exception; } return false; } 3. Vulnerability Existed: not sure [Added Input Validation] [include/laminas-mail/vendor/laminas/laminas-validator/src/Callback.php] [Lines 129-132] [Old Code] if (empty($callback)) { throw new Exception\InvalidArgumentException('No callback given'); } [Fixed Code] if (! is_callable($callback)) { throw new InvalidArgumentException('No callback given'); } 4. Vulnerability Existed: not sure [Added Type Safety] [include/laminas-mail/vendor/laminas/laminas-validator/src/Callback.php] [Lines 108-111] [Old Code] public function setCallbackOptions($options) [Fixed Code] public function setCallbackOptions(mixed $options) The changes appear to focus on improving type safety, exception handling, and input validation rather than fixing specific known vulnerabilities. The improvements make the code more robust and could potentially prevent certain types of security issues, but I can't identify any specific vulnerabilities being fixed. The changes include: - More strict type checking for callbacks - Better exception handling with configurable behavior - Improved input validation - Type hints and documentation improvements - Namespace usage improvements (using specific Exception class) These changes collectively improve the security posture of the code but don't appear to address any specific, named vulnerabilities.
osTicket prior to v1.17.6 and v1.18.2 are vulnerable to Broken Access Control Vulnerability in /scp/ajax.php.
A SQL injection vulnerability in the "Search" functionality of "tickets.php" page in osTicket <=1.17.5 allows authenticated attackers to execute arbitrary SQL commands via the "keywords" and "topic_id" URL parameters combination.
--- /root/PatchLeaks-main/products/osTicket_downloads/v1.17.5/osTicket-1.17.5/include/laminas-mail/vendor/laminas/laminas-stdlib/src/StringWrapper/AbstractStringWrapper.php+++ /root/PatchLeaks-main/products/osTicket_downloads/v1.18.2/osTicket-1.18.2/include/laminas-mail/vendor/laminas/laminas-stdlib/src/StringWrapper/AbstractStringWrapper.php@@ -1,26 +1,36 @@ <?php-/**- * @see https://github.com/laminas/laminas-stdlib for the canonical source repository- * @copyright https://github.com/laminas/laminas-stdlib/blob/master/COPYRIGHT.md- * @license https://github.com/laminas/laminas-stdlib/blob/master/LICENSE.md New BSD License- */+declare(strict_types=1); namespace Laminas\Stdlib\StringWrapper; use Laminas\Stdlib\Exception; use Laminas\Stdlib\StringUtils;+use function floor;+use function in_array;+use function sprintf;+use function str_pad;+use function str_repeat;+use function strtoupper;+use function wordwrap;++use const STR_PAD_BOTH;+use const STR_PAD_LEFT;+use const STR_PAD_RIGHT;+ abstract class AbstractStringWrapper implements StringWrapperInterface { /** * The character encoding working on+ * * @var string|null */ protected $encoding = 'UTF-8'; /** * An optionally character encoding to convert to+ * * @var string|null */ protected $convertEncoding;@@ -86,8 +96,8 @@ /** * Get the defined character encoding to work with *- * @return string- * @throws Exception\LogicException If no encoding was defined+ * @return null|string+ * @throws Exception\LogicException If no encoding was defined. */ public function getEncoding() {@@ -98,7 +108,7 @@ * Get the defined character encoding to convert to * * @return string|null- */+ */ public function getConvertEncoding() { return $this->convertEncoding;@@ -129,8 +139,8 @@ $to = $reverse ? $encoding : $convertEncoding; throw new Exception\RuntimeException(sprintf( 'Converting from "%s" to "%s" isn\'t supported by this string wrapper',- $from,- $to+ $from ?? '',+ $to ?? '' )); }@@ -160,7 +170,7 @@ throw new Exception\InvalidArgumentException('Cannot force cut when width is zero'); }- if (StringUtils::isSingleByteEncoding($this->getEncoding())) {+ if (null === $this->getEncoding() || StringUtils::isSingleByteEncoding($this->getEncoding())) { return wordwrap($string, $width, $break, $cut); }@@ -179,16 +189,16 @@ } if ($possibleBreak === $break) {- $result .= $this->substr($string, $lastStart, $current - $lastStart + $breakWidth);- $current += $breakWidth - 1;- $lastStart = $lastSpace = $current + 1;+ $result .= $this->substr($string, $lastStart, $current - $lastStart + $breakWidth);+ $current += $breakWidth - 1;+ $lastStart = $lastSpace = $current + 1; continue; } if ($char === ' ') { if ($current - $lastStart >= $width) {- $result .= $this->substr($string, $lastStart, $current - $lastStart) . $break;- $lastStart = $current + 1;+ $result .= $this->substr($string, $lastStart, $current - $lastStart) . $break;+ $lastStart = $current + 1; } $lastSpace = $current;@@ -196,14 +206,14 @@ } if ($current - $lastStart >= $width && $cut && $lastStart >= $lastSpace) {- $result .= $this->substr($string, $lastStart, $current - $lastStart) . $break;- $lastStart = $lastSpace = $current;+ $result .= $this->substr($string, $lastStart, $current - $lastStart) . $break;+ $lastStart = $lastSpace = $current; continue; } if ($current - $lastStart >= $width && $lastStart < $lastSpace) {- $result .= $this->substr($string, $lastStart, $lastSpace - $lastStart) . $break;- $lastStart = $lastSpace = $lastSpace + 1;+ $result .= $this->substr($string, $lastStart, $lastSpace - $lastStart) . $break;+ $lastStart = $lastSpace += 1; continue; } }@@ -226,7 +236,7 @@ */ public function strPad($input, $padLength, $padString = ' ', $padType = STR_PAD_RIGHT) {- if (StringUtils::isSingleByteEncoding($this->getEncoding())) {+ if (null === $this->getEncoding() || StringUtils::isSingleByteEncoding($this->getEncoding())) { return str_pad($input, $padLength, $padString, $padType); }@@ -240,13 +250,13 @@ return $input; }- $repeatCount = floor($lengthOfPadding / $padStringLength);+ $repeatCount = (int) floor($lengthOfPadding / $padStringLength); if ($padType === STR_PAD_BOTH) { $repeatCountLeft = $repeatCountRight = ($repeatCount - $repeatCount % 2) / 2; $lastStringLength = $lengthOfPadding - 2 * $repeatCountLeft * $padStringLength;- $lastStringLeftLength = $lastStringRightLength = floor($lastStringLength / 2);+ $lastStringLeftLength = $lastStringRightLength = (int) floor($lastStringLength / 2); $lastStringRightLength += $lastStringLength % 2; $lastStringLeft = $this->substr($padString, 0, $lastStringLeftLength);
Analyzing the provided code diff, I can identify one security-related improvement: 1. Vulnerability Existed: yes Null Pointer Dereference Vulnerability [include/laminas-mail/vendor/laminas/laminas-stdlib/src/StringWrapper/AbstractStringWrapper.php] [Lines 129-132] [Old Code] throw new Exception\RuntimeException(sprintf( 'Converting from "%s" to "%s" isn\'t supported by this string wrapper', $from, $to )); [Fixed Code] throw new Exception\RuntimeException(sprintf( 'Converting from "%s" to "%s" isn\'t supported by this string wrapper', $from ?? '', $to ?? '' )); The fix adds null checks (using the null coalescing operator ??) for the $from and $to variables when they're used in the sprintf() call. This prevents potential null pointer dereference issues if either variable is null. While this might not be a direct security vulnerability in all contexts, it's a defensive programming improvement that prevents potential crashes or information leaks that could occur if null values reached this point. 2. Vulnerability Existed: not sure Potential Integer Overflow/Type Safety [include/laminas-mail/vendor/laminas/laminas-stdlib/src/StringWrapper/AbstractStringWrapper.php] [Lines 250, 256] [Old Code] $repeatCount = floor($lengthOfPadding / $padStringLength); ... $lastStringLeftLength = $lastStringRightLength = floor($lastStringLength / 2); [Fixed Code] $repeatCount = (int) floor($lengthOfPadding / $padStringLength); ... $lastStringLeftLength = $lastStringRightLength = (int) floor($lastStringLength / 2); The changes add explicit type casting to (int) for floor() operations. While not clearly a security fix, this could potentially prevent type-related issues or integer overflow problems in some edge cases. However, without more context about how these values are used, I can't be certain if this was specifically addressing a security vulnerability. The other changes in the diff appear to be primarily code style improvements, documentation updates, and general robustness enhancements rather than direct security fixes.
osTicket prior to v1.17.6 and v1.18.2 are vulnerable to Broken Access Control Vulnerability in /scp/ajax.php.
A SQL injection vulnerability in the "Search" functionality of "tickets.php" page in osTicket <=1.17.5 allows authenticated attackers to execute arbitrary SQL commands via the "keywords" and "topic_id" URL parameters combination.
--- /root/PatchLeaks-main/products/osTicket_downloads/v1.17.5/osTicket-1.17.5/include/laminas-mail/vendor/laminas/laminas-validator/src/Exception/ExtensionNotLoadedException.php+++ /root/PatchLeaks-main/products/osTicket_downloads/v1.18.2/osTicket-1.18.2/include/laminas-mail/vendor/laminas/laminas-validator/src/Exception/ExtensionNotLoadedException.php@@ -1,10 +1,4 @@ <?php--/**- * @see https://github.com/laminas/laminas-validator for the canonical source repository- * @copyright https://github.com/laminas/laminas-validator/blob/master/COPYRIGHT.md- * @license https://github.com/laminas/laminas-validator/blob/master/LICENSE.md New BSD License- */ namespace Laminas\Validator\Exception;
Based on the provided diff, I'll analyze it for security vulnerabilities: Vulnerability Existed: no [No specific vulnerability] [include/laminas-mail/vendor/laminas/laminas-validator/src/Exception/ExtensionNotLoadedException.php] [Lines 1-10] [Old Code] <?php /** * @see https://github.com/laminas/laminas-validator for the canonical source repository * @copyright https://github.com/laminas/laminas-validator/blob/master/COPYRIGHT.md * @license https://github.com/laminas/laminas-validator/blob/master/LICENSE.md New BSD License */ namespace Laminas\Validator\Exception; [Fixed Code] <?php namespace Laminas\Validator\Exception; Additional Details: The changes shown in the diff only remove documentation comments (the file header with @see, @copyright, and @license tags). This appears to be a documentation cleanup rather than a security fix. There are no changes to actual code functionality or security-related patterns. The modification doesn't indicate any security vulnerability being addressed.
osTicket prior to v1.17.6 and v1.18.2 are vulnerable to Broken Access Control Vulnerability in /scp/ajax.php.
A SQL injection vulnerability in the "Search" functionality of "tickets.php" page in osTicket <=1.17.5 allows authenticated attackers to execute arbitrary SQL commands via the "keywords" and "topic_id" URL parameters combination.
--- /root/PatchLeaks-main/products/osTicket_downloads/v1.17.5/osTicket-1.17.5/include/laminas-mail/src/Exception/InvalidArgumentException.php+++ /root/PatchLeaks-main/products/osTicket_downloads/v1.18.2/osTicket-1.18.2/include/laminas-mail/src/Exception/InvalidArgumentException.php@@ -1,10 +1,4 @@ <?php--/**- * @see https://github.com/laminas/laminas-mail for the canonical source repository- * @copyright https://github.com/laminas/laminas-mail/blob/master/COPYRIGHT.md- * @license https://github.com/laminas/laminas-mail/blob/master/LICENSE.md New BSD License- */ namespace Laminas\Mail\Exception;
Based on the provided diff, I'll analyze it for security vulnerabilities: Vulnerability Existed: no No specific vulnerability [File] include/laminas-mail/src/Exception/InvalidArgumentException.php [Lines] 1-10 [Old Code] <?php /** * @see https://github.com/laminas/laminas-mail for the canonical source repository * @copyright https://github.com/laminas/laminas-mail/blob/master/COPYRIGHT.md * @license https://github.com/laminas/laminas-mail/blob/master/LICENSE.md New BSD License */ [Fixed Code] <?php The changes shown in the diff are purely documentation-related (removal of license/copyright headers) and don't appear to affect any security-related functionality. The modification doesn't show any changes to actual exception handling or security-sensitive code.
osTicket prior to v1.17.6 and v1.18.2 are vulnerable to Broken Access Control Vulnerability in /scp/ajax.php.
A SQL injection vulnerability in the "Search" functionality of "tickets.php" page in osTicket <=1.17.5 allows authenticated attackers to execute arbitrary SQL commands via the "keywords" and "topic_id" URL parameters combination.
--- /root/PatchLeaks-main/products/osTicket_downloads/v1.17.5/osTicket-1.17.5/include/laminas-mail/src/Transport/InMemory.php+++ /root/PatchLeaks-main/products/osTicket_downloads/v1.18.2/osTicket-1.18.2/include/laminas-mail/src/Transport/InMemory.php@@ -1,10 +1,4 @@ <?php--/**- * @see https://github.com/laminas/laminas-mail for the canonical source repository- * @copyright https://github.com/laminas/laminas-mail/blob/master/COPYRIGHT.md- * @license https://github.com/laminas/laminas-mail/blob/master/LICENSE.md New BSD License- */ namespace Laminas\Mail\Transport;@@ -19,15 +13,11 @@ */ class InMemory implements TransportInterface {- /**- * @var null|Message- */+ /** @var null|Message */ protected $lastMessage; /** * Takes the last message and saves it for testing.- *- * @param Message $message */ public function send(Message $message) {
Based on the provided code diff, I'll analyze it for security fixes: 1. Vulnerability Existed: no The changes shown in the diff are primarily documentation and code style changes rather than security fixes. The modifications include: - Removal of file header comments (copyright/license information) - Simplification of docblock annotations - Removal of redundant parameter documentation No actual code logic changes were made that would indicate a security vulnerability fix. The changes appear to be part of code cleanup or documentation standardization rather than addressing any specific security issue. The diff doesn't show any: - Changes to input validation - Changes to security-related functionality - Fixes for known vulnerability patterns - Modifications to sensitive operations The only functional code change is the removal of parameter documentation in the send() method, which doesn't impact security.
osTicket prior to v1.17.6 and v1.18.2 are vulnerable to Broken Access Control Vulnerability in /scp/ajax.php.
A SQL injection vulnerability in the "Search" functionality of "tickets.php" page in osTicket <=1.17.5 allows authenticated attackers to execute arbitrary SQL commands via the "keywords" and "topic_id" URL parameters combination.
--- /root/PatchLeaks-main/products/osTicket_downloads/v1.17.5/osTicket-1.17.5/include/laminas-mail/vendor/laminas/laminas-stdlib/src/ArrayUtils/MergeRemoveKey.php+++ /root/PatchLeaks-main/products/osTicket_downloads/v1.18.2/osTicket-1.18.2/include/laminas-mail/vendor/laminas/laminas-stdlib/src/ArrayUtils/MergeRemoveKey.php@@ -1,10 +1,6 @@ <?php-/**- * @see https://github.com/laminas/laminas-stdlib for the canonical source repository- * @copyright https://github.com/laminas/laminas-stdlib/blob/master/COPYRIGHT.md- * @license https://github.com/laminas/laminas-stdlib/blob/master/LICENSE.md New BSD License- */+declare(strict_types=1); namespace Laminas\Stdlib\ArrayUtils;
Analyzing the provided code diff, here's the security analysis: 1. Vulnerability Existed: no No specific vulnerability found [File] include/laminas-mail/vendor/laminas/laminas-stdlib/src/ArrayUtils/MergeRemoveKey.php [Lines] 1-10 Old Code: ```php <?php /** * @see https://github.com/laminas/laminas-stdlib for the canonical source repository * @copyright https://github.com/laminas/laminas-stdlib/blob/master/COPYRIGHT.md * @license https://github.com/laminas/laminas-stdlib/blob/master/LICENSE.md New BSD License */ ``` Fixed Code: ```php <?php declare(strict_types=1); ``` The changes in this diff appear to be: 1. Removal of documentation headers (copyright/license information) 2. Addition of strict type declaration These changes don't appear to address any specific security vulnerability but rather improve code quality and maintainability by: - Adding strict type checking which can help prevent type-related bugs - Removing redundant documentation headers No security vulnerabilities were identified in this particular diff. The changes seem to be general code improvements rather than security fixes.
osTicket prior to v1.17.6 and v1.18.2 are vulnerable to Broken Access Control Vulnerability in /scp/ajax.php.
A SQL injection vulnerability in the "Search" functionality of "tickets.php" page in osTicket <=1.17.5 allows authenticated attackers to execute arbitrary SQL commands via the "keywords" and "topic_id" URL parameters combination.
--- /root/PatchLeaks-main/products/osTicket_downloads/v1.17.5/osTicket-1.17.5/include/laminas-mail/src/Address/AddressInterface.php+++ /root/PatchLeaks-main/products/osTicket_downloads/v1.18.2/osTicket-1.18.2/include/laminas-mail/src/Address/AddressInterface.php@@ -1,10 +1,4 @@ <?php--/**- * @see https://github.com/laminas/laminas-mail for the canonical source repository- * @copyright https://github.com/laminas/laminas-mail/blob/master/COPYRIGHT.md- * @license https://github.com/laminas/laminas-mail/blob/master/LICENSE.md New BSD License- */ namespace Laminas\Mail\Address;@@ -18,9 +12,9 @@ public function getEmail(); /**- * Retrieve name+ * Retrieve name, if any *- * @return string+ * @return null|string */ public function getName();
Here's the analysis of the provided code diff: 1. Vulnerability Existed: no Documentation Update [File] include/laminas-mail/src/Address/AddressInterface.php [Lines] 12-18 Old Code: /** * Retrieve name * * @return string */ public function getName(); Fixed Code: /** * Retrieve name, if any * * @return null|string */ public function getName(); 2. Vulnerability Existed: no Header Comment Removal [File] include/laminas-mail/src/Address/AddressInterface.php [Lines] 1-10 Old Code: <?php /** * @see https://github.com/laminas/laminas-mail for the canonical source repository * @copyright https://github.com/laminas/laminas-mail/blob/master/COPYRIGHT.md * @license https://github.com/laminas/laminas-mail/blob/master/LICENSE.md New BSD License */ Fixed Code: <?php The changes appear to be documentation-related rather than security fixes. The main change is making the getName() method's return type more accurate by indicating it can return null, and removing the file header comment block. Neither change addresses a security vulnerability.
osTicket prior to v1.17.6 and v1.18.2 are vulnerable to Broken Access Control Vulnerability in /scp/ajax.php.
A SQL injection vulnerability in the "Search" functionality of "tickets.php" page in osTicket <=1.17.5 allows authenticated attackers to execute arbitrary SQL commands via the "keywords" and "topic_id" URL parameters combination.