Skip to content

Commit d041bab

Browse files
author
TheSnoozer
committed
in the future the evaluateOnCommit is being validated in the core-module
1 parent 742dfdf commit d041bab

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

src/main/java/pl/project13/maven/git/GitCommitIdMojo.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import java.text.SimpleDateFormat;
2626
import java.util.*;
2727
import java.util.function.Supplier;
28-
import java.util.regex.Pattern;
2928

3029
import org.apache.maven.execution.MavenSession;
3130
import org.apache.maven.plugin.AbstractMojo;
@@ -352,12 +351,6 @@ public class GitCommitIdMojo extends AbstractMojo {
352351
*/
353352
@Parameter(defaultValue = "HEAD")
354353
String evaluateOnCommit;
355-
/**
356-
* The plugin allows to specify branch/tag/commit used when finding 'HEAD'.
357-
* However we don't want the users to enter everything here and thus allow only the following subset.
358-
* See https://github.com/git-commit-id/git-commit-id-maven-plugin/issues/338 for further information
359-
*/
360-
protected static final Pattern allowedCharactersForEvaluateOnCommit = Pattern.compile("[a-zA-Z0-9\\_\\-\\^\\/\\.]+");
361354

362355
/**
363356
* Allow to specify a timeout (in milliseconds) for fetching information with the native Git executable.
@@ -545,11 +538,6 @@ public void error(String msg, Throwable t) {
545538
return;
546539
}
547540

548-
if ((evaluateOnCommit == null) || !allowedCharactersForEvaluateOnCommit.matcher(evaluateOnCommit).matches()) {
549-
log.error("suspicious argument for evaluateOnCommit, aborting execution!");
550-
return;
551-
}
552-
553541
try {
554542
commitIdGenerationModeEnum = CommitIdGenerationMode.valueOf(commitIdGenerationMode.toUpperCase());
555543
} catch (IllegalArgumentException e) {

0 commit comments

Comments
 (0)