Skip to content

Commit

Permalink
Merge pull request #10894 from lekoala/patch-43
Browse files Browse the repository at this point in the history
Ensure cache key only contains valid characters
  • Loading branch information
GuySartorelli authored Aug 3, 2023
2 parents 6ed50b5 + 0e839e1 commit 0e74e35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Core/Manifest/VersionProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class VersionProvider
*/
public function getVersion()
{
$key = sprintf('%s-%s', $this->getComposerLockPath(), 'all');
$key = preg_replace("/[^A-Za-z0-9]/", '_', $this->getComposerLockPath() . '_all');
$version = $this->getCachedValue($key);
if ($version) {
return $version;
Expand Down Expand Up @@ -80,7 +80,7 @@ public function getVersion()
*/
public function getModuleVersion(string $module): string
{
$key = sprintf('%s-%s', $this->getComposerLockPath(), $module);
$key = preg_replace("/[^A-Za-z0-9]/", '_', $this->getComposerLockPath() . '_' . $module);
$version = $this->getCachedValue($key);
if ($version) {
return $version;
Expand Down

0 comments on commit 0e74e35

Please sign in to comment.