aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2018-11-28 21:15:28 +0100
committersteckbrief <steckbrief@chefmail.de>2018-11-28 21:15:28 +0100
commit6ca8374504e4b3c33aa080b8579b3a950f6d8682 (patch)
tree0d5196619f8ab5bd88eaccd4f916217438e67b0f
parent3ac60598246cda6947a5ced173784c3ee25622c3 (diff)
fixes replacing /mvn multiple times in the artifact path. only the first match needs be replaced
-rw-r--r--src/mvncache.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mvncache.php b/src/mvncache.php
index 7abb765..a3cfa7c 100644
--- a/src/mvncache.php
+++ b/src/mvncache.php
@@ -8,7 +8,7 @@ $config = require(__DIR__.'/config/config.inc.php');
initTheDevStackErrorHandler($config["logfile"]);
$requestedArtifact = $_SERVER["REQUEST_URI"];
-$requestedArtifact = str_replace('/mvn', '', $requestedArtifact);
+$requestedArtifact = preg_replace('/^\/mvn/', '', $requestedArtifact);
$baseLocalFolder = __DIR__.'/..';
$localFolder = $baseLocalFolder.substr($requestedArtifact, 0, strripos($requestedArtifact, '/'));