Skip to content
Permalink
Browse files

[JENKINS-9283] - Don't accept invalid timezones, add form validation

  • Loading branch information...
oleg-nenashev authored and daniel-beck committed Jun 6, 2015
1 parent b171bc6 commit f6176bc19d6d62bb9dd20748af080fcb1cfd9976
@@ -108,9 +108,9 @@ public static CronTabList create(@Nonnull String format, Hash hash) throws ANTLR
if(lineNumber == 1 && line.startsWith("TZ=")) {
timezone = getValidTimezone(line.replace("TZ=",""));
if(timezone != null) {
LOGGER.log(Level.CONFIG, "cron with timezone {0}", timezone);
LOGGER.log(Level.CONFIG, "CRON with timezone {0}", timezone);
} else {
LOGGER.log(Level.CONFIG, "invalid timezone {0}", line);
throw new ANTLRException("Invalid or unsupported timezone '" + line + "'");
}
continue;
}
@@ -89,7 +89,7 @@
</p>
<ul>
<li>Timezone specification should contain the &quot;TZ=$(timezoneID)&quot; string</li>
<li>If a timezone is not specified or if it is specified incorrectly, the default Jenkins JVM timezone will be used</li>
<li>If a timezone is not specified, the default Jenkins JVM timezone will be used</li>
<li>Th supports all timezones returned by
<a href="https://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html#getAvailableIDs()">
java.util.TimeZone::getAvailableIDs()

0 comments on commit f6176bc

Please sign in to comment.
You can’t perform that action at this time.