mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-21 15:55:40 +00:00
[JENKINS-9283] - Don't accept invalid timezones, add form validation
This commit is contained in:
1 parent
b171bc6053
commit
f6176bc19d
2 files changed
+3
-3
No files matched your search
@@ -108,9 +108,9 @@ public final class CronTabList {
|
||||
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 @@ H H 1,15 1-11 *
|
||||
</p>
|
||||
<ul>
|
||||
<li>Timezone specification should contain the "TZ=$(timezoneID)" 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()
|
||||
|
||||
Reference in new issue
Block a user