Skip to content

Commit

Permalink
Merge pull request #173 from jglick/user.name.escaped
Browse files Browse the repository at this point in the history
[INFRA-1248] ${user.name} might contain metacharacters
  • Loading branch information
oleg-nenashev committed Jun 27, 2017
2 parents 57d3b8e + b38d52b commit 78bcc32
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion pom.xml
Expand Up @@ -388,6 +388,19 @@ THE SOFTWARE.
<locale>en_US</locale>
</configuration>
</execution>
<execution>
<id>user.name</id>
<goals>
<goal>regex-property</goal>
</goals>
<configuration>
<name>user.name.escaped</name>
<value>${user.name}</value>
<regex>([$\\])</regex>
<replacement>\\$1</replacement>
<failIfNoMatch>false</failIfNoMatch>
</configuration>
</execution>
<execution>
<id>version-property</id>
<goals>
Expand All @@ -397,7 +410,7 @@ THE SOFTWARE.
<name>build.version</name>
<value>${project.version}</value>
<regex>-SNAPSHOT</regex>
<replacement>-SNAPSHOT (${build.type}-${now}-${user.name})</replacement>
<replacement>-SNAPSHOT (${build.type}-${now}-${user.name.escaped})</replacement>
<failIfNoMatch>false</failIfNoMatch>
</configuration>
</execution>
Expand Down

0 comments on commit 78bcc32

Please sign in to comment.