From 336751615c5603d8fa2d997d76c923854e2315cf Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Wed, 21 Dec 2016 17:04:10 -0500 Subject: [PATCH 1/8] [SECURITY-353] Reproduced problem in test. --- .../java/hudson/model/ParametersTest.java | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/test/src/test/java/hudson/model/ParametersTest.java b/test/src/test/java/hudson/model/ParametersTest.java index 9f525a420c..4c837afa97 100644 --- a/test/src/test/java/hudson/model/ParametersTest.java +++ b/test/src/test/java/hudson/model/ParametersTest.java @@ -4,9 +4,12 @@ import static org.junit.Assert.*; import com.gargoylesoftware.htmlunit.html.DomNodeUtil; import com.gargoylesoftware.htmlunit.html.HtmlFormUtil; +import static org.hamcrest.Matchers.*; import org.junit.Rule; import org.junit.Test; +import org.junit.rules.ErrorCollector; +import org.apache.http.HttpStatus; import com.gargoylesoftware.htmlunit.html.HtmlPage; import com.gargoylesoftware.htmlunit.html.HtmlForm; import com.gargoylesoftware.htmlunit.html.HtmlElement; @@ -19,6 +22,7 @@ import org.jvnet.hudson.test.JenkinsRule; import org.jvnet.hudson.test.JenkinsRule.WebClient; import java.util.Set; +import org.junit.Ignore; /** * @author huybrechts @@ -28,6 +32,9 @@ public class ParametersTest { @Rule public JenkinsRule j = new JenkinsRule(); + @Rule + public ErrorCollector collector = new ErrorCollector(); + @Test public void parameterTypes() throws Exception { FreeStyleProject otherProject = j.createFreeStyleProject(); @@ -216,4 +223,38 @@ public class ParametersTest { final HtmlForm form = page.getFormByName("parameters"); HtmlFormUtil.submit(form, HtmlFormUtil.getButtonByCaption(form, "Build")); } + + @Ignore("TODO fix") + @Issue("SECURITY-353") + @Test + public void xss() throws Exception { + FreeStyleProject p = j.createFreeStyleProject("p"); + p.addProperty(new ParametersDefinitionProperty(new StringParameterDefinition("", "", ""))); + WebClient wc = j.createWebClient(); + wc.getOptions().setThrowExceptionOnFailingStatusCode(false); + HtmlPage page = wc.getPage(p, "build?delay=0sec"); + collector.checkThat(page.getWebResponse().getStatusCode(), is(HttpStatus.SC_METHOD_NOT_ALLOWED)); // 405 to dissuade scripts from thinking this triggered the build + String text = page.getWebResponse().getContentAsString(); + collector.checkThat(text, containsString("<param name>")); + collector.checkThat(text, not(containsString(""))); + collector.checkThat(text, containsString("<param default>")); + collector.checkThat(text, not(containsString(""))); + collector.checkThat(text, containsString("<param description>")); + collector.checkThat(text, not(containsString(""))); + HtmlForm form = page.getFormByName("parameters"); + HtmlTextInput value = form.getInputByValue(""); + value.setText(""); + j.submit(form); + j.waitUntilNoActivity(); + FreeStyleBuild b = p.getBuildByNumber(1); + page = j.createWebClient().getPage(b, "parameters/"); + text = page.getWebResponse().getContentAsString(); + collector.checkThat(text, containsString("<param name>")); + collector.checkThat(text, not(containsString(""))); + collector.checkThat(text, containsString("<param value>")); + collector.checkThat(text, not(containsString(""))); + collector.checkThat(text, containsString("<param description>")); + collector.checkThat(text, not(containsString(""))); + } + } From c8aa949ff5405e86cc4b65860ff7d04579966480 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Wed, 21 Dec 2016 17:04:20 -0500 Subject: [PATCH 2/8] Noting need for escapes. --- core/src/main/resources/lib/form/entry.jelly | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/main/resources/lib/form/entry.jelly b/core/src/main/resources/lib/form/entry.jelly index 78e80aaf0c..1642dae3b5 100644 --- a/core/src/main/resources/lib/form/entry.jelly +++ b/core/src/main/resources/lib/form/entry.jelly @@ -32,6 +32,8 @@ THE SOFTWARE. Name of the entry. Think of this like a label for the control. + + This content is HTML. Use h.escape if necessary. Used for the databinding. TBD. When this attribute @@ -46,6 +48,8 @@ THE SOFTWARE. This text shouldn't get too long, and in recent Hudson, this feature is somewhat de-emphasized, in favor of the inline foldable help page specified via @help. + + This content is HTML. Use h.escape if necessary. URL to the HTML page. When this attribute is specified, the entry gets From 2e8837527d82899f719fd9b963667f9e2ecb7035 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Wed, 21 Dec 2016 17:17:59 -0500 Subject: [PATCH 3/8] We also expect descriptions to be formatted, not merely escaped. --- .../java/hudson/model/ParametersTest.java | 71 ++++++++++++------- 1 file changed, 44 insertions(+), 27 deletions(-) diff --git a/test/src/test/java/hudson/model/ParametersTest.java b/test/src/test/java/hudson/model/ParametersTest.java index 4c837afa97..eb8090d6f6 100644 --- a/test/src/test/java/hudson/model/ParametersTest.java +++ b/test/src/test/java/hudson/model/ParametersTest.java @@ -1,29 +1,31 @@ package hudson.model; -import static org.junit.Assert.*; - import com.gargoylesoftware.htmlunit.html.DomNodeUtil; +import com.gargoylesoftware.htmlunit.html.HtmlCheckBoxInput; +import com.gargoylesoftware.htmlunit.html.HtmlElement; +import com.gargoylesoftware.htmlunit.html.HtmlForm; import com.gargoylesoftware.htmlunit.html.HtmlFormUtil; +import com.gargoylesoftware.htmlunit.html.HtmlOption; +import com.gargoylesoftware.htmlunit.html.HtmlPage; +import com.gargoylesoftware.htmlunit.html.HtmlTextInput; +import hudson.markup.MarkupFormatter; +import java.io.IOException; +import java.io.Writer; +import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import org.apache.http.HttpStatus; import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ErrorCollector; - -import org.apache.http.HttpStatus; -import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.gargoylesoftware.htmlunit.html.HtmlForm; -import com.gargoylesoftware.htmlunit.html.HtmlElement; -import com.gargoylesoftware.htmlunit.html.HtmlTextInput; -import com.gargoylesoftware.htmlunit.html.HtmlCheckBoxInput; -import com.gargoylesoftware.htmlunit.html.HtmlOption; import org.jvnet.hudson.test.CaptureEnvironmentBuilder; import org.jvnet.hudson.test.Issue; import org.jvnet.hudson.test.JenkinsRule; import org.jvnet.hudson.test.JenkinsRule.WebClient; -import java.util.Set; -import org.junit.Ignore; - /** * @author huybrechts */ @@ -224,23 +226,26 @@ public class ParametersTest { HtmlFormUtil.submit(form, HtmlFormUtil.getButtonByCaption(form, "Build")); } - @Ignore("TODO fix") + @Ignore("TODO build page should not leave param name unescaped; parameters page should escape param name; parameters page should not leave param name unescaped; parameters page should mark up param description; parameters page should not leave param description unescaped") @Issue("SECURITY-353") @Test public void xss() throws Exception { + j.jenkins.setMarkupFormatter(new MyMarkupFormatter()); FreeStyleProject p = j.createFreeStyleProject("p"); - p.addProperty(new ParametersDefinitionProperty(new StringParameterDefinition("", "", ""))); + StringParameterDefinition param = new StringParameterDefinition("", "", ""); + assertEquals("[param description]", param.getFormattedDescription()); + p.addProperty(new ParametersDefinitionProperty(param)); WebClient wc = j.createWebClient(); wc.getOptions().setThrowExceptionOnFailingStatusCode(false); HtmlPage page = wc.getPage(p, "build?delay=0sec"); collector.checkThat(page.getWebResponse().getStatusCode(), is(HttpStatus.SC_METHOD_NOT_ALLOWED)); // 405 to dissuade scripts from thinking this triggered the build String text = page.getWebResponse().getContentAsString(); - collector.checkThat(text, containsString("<param name>")); - collector.checkThat(text, not(containsString(""))); - collector.checkThat(text, containsString("<param default>")); - collector.checkThat(text, not(containsString(""))); - collector.checkThat(text, containsString("<param description>")); - collector.checkThat(text, not(containsString(""))); + collector.checkThat("build page should escape param name", text, containsString("<param name>")); + collector.checkThat("build page should not leave param name unescaped", text, not(containsString(""))); + collector.checkThat("build page should escape param default", text, containsString("<param default>")); + collector.checkThat("build page should not leave param default unescaped", text, not(containsString(""))); + collector.checkThat("build page should mark up param description", text, containsString("[param description]")); + collector.checkThat("build page should not leave param description unescaped", text, not(containsString(""))); HtmlForm form = page.getFormByName("parameters"); HtmlTextInput value = form.getInputByValue(""); value.setText(""); @@ -249,12 +254,24 @@ public class ParametersTest { FreeStyleBuild b = p.getBuildByNumber(1); page = j.createWebClient().getPage(b, "parameters/"); text = page.getWebResponse().getContentAsString(); - collector.checkThat(text, containsString("<param name>")); - collector.checkThat(text, not(containsString(""))); - collector.checkThat(text, containsString("<param value>")); - collector.checkThat(text, not(containsString(""))); - collector.checkThat(text, containsString("<param description>")); - collector.checkThat(text, not(containsString(""))); + collector.checkThat("parameters page should escape param name", text, containsString("<param name>")); + collector.checkThat("parameters page should not leave param name unescaped", text, not(containsString(""))); + collector.checkThat("parameters page should escape param value", text, containsString("<param value>")); + collector.checkThat("parameters page should not leave param value unescaped", text, not(containsString(""))); + collector.checkThat("parameters page should mark up param description", text, containsString("[param description]")); + collector.checkThat("parameters page should not leave param description unescaped", text, not(containsString(""))); + } + static class MyMarkupFormatter extends MarkupFormatter { + @Override + public void translate(String markup, Writer output) throws IOException { + Matcher m = Pattern.compile("[<>]").matcher(markup); + StringBuffer buf = new StringBuffer(); + while (m.find()) { + m.appendReplacement(buf, m.group().equals("<") ? "[" : "]"); + } + m.appendTail(buf); + output.write(buf.toString()); + } } } From b561ca5696f12d8e017f79cc2080c394c6710719 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Wed, 21 Dec 2016 17:49:16 -0500 Subject: [PATCH 4/8] [SECURITY-353] Solved XSS, at the cost of markup formatters. --- .../main/resources/hudson/model/ParametersAction/index.jelly | 1 + .../hudson/model/ParametersDefinitionProperty/index.jelly | 1 + core/src/main/resources/lib/form/entry.jelly | 4 ++-- test/src/test/java/hudson/model/ParametersTest.java | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/main/resources/hudson/model/ParametersAction/index.jelly b/core/src/main/resources/hudson/model/ParametersAction/index.jelly index 2c25579adc..d5c4ca771c 100644 --- a/core/src/main/resources/hudson/model/ParametersAction/index.jelly +++ b/core/src/main/resources/hudson/model/ParametersAction/index.jelly @@ -36,6 +36,7 @@ THE SOFTWARE.

${%Build} ${build.displayName}

+ diff --git a/core/src/main/resources/hudson/model/ParametersDefinitionProperty/index.jelly b/core/src/main/resources/hudson/model/ParametersDefinitionProperty/index.jelly index d91f088dcb..a166f87dc8 100644 --- a/core/src/main/resources/hudson/model/ParametersDefinitionProperty/index.jelly +++ b/core/src/main/resources/hudson/model/ParametersDefinitionProperty/index.jelly @@ -45,6 +45,7 @@ THE SOFTWARE. + diff --git a/core/src/main/resources/lib/form/entry.jelly b/core/src/main/resources/lib/form/entry.jelly index 1642dae3b5..b8d8a38e3b 100644 --- a/core/src/main/resources/lib/form/entry.jelly +++ b/core/src/main/resources/lib/form/entry.jelly @@ -71,7 +71,7 @@ THE SOFTWARE. - + @@ -82,7 +82,7 @@ THE SOFTWARE. - + diff --git a/test/src/test/java/hudson/model/ParametersTest.java b/test/src/test/java/hudson/model/ParametersTest.java index eb8090d6f6..46a89eeb26 100644 --- a/test/src/test/java/hudson/model/ParametersTest.java +++ b/test/src/test/java/hudson/model/ParametersTest.java @@ -226,7 +226,7 @@ public class ParametersTest { HtmlFormUtil.submit(form, HtmlFormUtil.getButtonByCaption(form, "Build")); } - @Ignore("TODO build page should not leave param name unescaped; parameters page should escape param name; parameters page should not leave param name unescaped; parameters page should mark up param description; parameters page should not leave param description unescaped") + @Ignore("TODO build page should mark up param description; parameters page should mark up param description") @Issue("SECURITY-353") @Test public void xss() throws Exception { From 2c1c1ecef964c143e5213c87ed8c1bdf282156c6 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Mon, 17 Oct 2016 16:27:49 -0400 Subject: [PATCH 5/8] Placate the JDK 9 compiler. (cherry picked from commit 441bf1c2553d76425f9834906e63415eea6f391f) --- core/src/main/java/hudson/model/Job.java | 4 ++-- core/src/main/java/hudson/model/ParametersAction.java | 6 +++--- core/src/main/java/hudson/tools/ToolDescriptor.java | 2 +- core/src/main/java/hudson/util/CopyOnWriteList.java | 2 +- core/src/main/java/hudson/util/Iterators.java | 9 ++++++--- .../main/java/jenkins/model/InterruptedBuildAction.java | 2 +- 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/core/src/main/java/hudson/model/Job.java b/core/src/main/java/hudson/model/Job.java index 85d440f25a..339046161b 100644 --- a/core/src/main/java/hudson/model/Job.java +++ b/core/src/main/java/hudson/model/Job.java @@ -680,7 +680,7 @@ public abstract class Job, RunT extends Run getBuilds() { - return RunList.fromRuns(_getRuns().values()); + return RunList.fromRuns(_getRuns().values()); } /** @@ -712,7 +712,7 @@ public abstract class Job, RunT extends Run getBuildsAsMap() { - return Collections.unmodifiableSortedMap(_getRuns()); + return Collections.unmodifiableSortedMap(_getRuns()); } /** diff --git a/core/src/main/java/hudson/model/ParametersAction.java b/core/src/main/java/hudson/model/ParametersAction.java index c8ed6c7c3c..d766f6a7c5 100644 --- a/core/src/main/java/hudson/model/ParametersAction.java +++ b/core/src/main/java/hudson/model/ParametersAction.java @@ -49,7 +49,7 @@ import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; -import static com.google.common.collect.Lists.newArrayList; +import com.google.common.collect.Lists; import static com.google.common.collect.Sets.newHashSet; import javax.annotation.CheckForNull; import javax.annotation.Nonnull; @@ -144,7 +144,7 @@ public class ParametersAction implements RunAction2, Iterable, Q @Exported(visibility=2) public List getParameters() { - return Collections.unmodifiableList(filter(parameters)); + return Collections.unmodifiableList(filter(parameters)); } public ParameterValue getParameter(String name) { @@ -204,7 +204,7 @@ public class ParametersAction implements RunAction2, Iterable, Q if(overrides == null) { return new ParametersAction(parameters); } - List combinedParameters = newArrayList(overrides); + List combinedParameters = Lists.newArrayList(overrides); Set names = newHashSet(); for(ParameterValue v : overrides) { diff --git a/core/src/main/java/hudson/tools/ToolDescriptor.java b/core/src/main/java/hudson/tools/ToolDescriptor.java index 567c298a0d..d07639425f 100644 --- a/core/src/main/java/hudson/tools/ToolDescriptor.java +++ b/core/src/main/java/hudson/tools/ToolDescriptor.java @@ -86,7 +86,7 @@ public abstract class ToolDescriptor extends Descrip * Lists up {@link ToolPropertyDescriptor}s that are applicable to this {@link ToolInstallation}. */ public List getPropertyDescriptors() { - return PropertyDescriptor.for_(ToolProperty.all(),clazz); + return PropertyDescriptor.for_(ToolProperty.all(), clazz); } /** diff --git a/core/src/main/java/hudson/util/CopyOnWriteList.java b/core/src/main/java/hudson/util/CopyOnWriteList.java index 43e189ba19..4e6af51dc6 100644 --- a/core/src/main/java/hudson/util/CopyOnWriteList.java +++ b/core/src/main/java/hudson/util/CopyOnWriteList.java @@ -143,7 +143,7 @@ public class CopyOnWriteList implements Iterable { } public List getView() { - return Collections.unmodifiableList(core); + return Collections.unmodifiableList(core); } public void addAllTo(Collection dst) { diff --git a/core/src/main/java/hudson/util/Iterators.java b/core/src/main/java/hudson/util/Iterators.java index 2b5d88f74b..74d82950dc 100644 --- a/core/src/main/java/hudson/util/Iterators.java +++ b/core/src/main/java/hudson/util/Iterators.java @@ -24,6 +24,7 @@ package hudson.util; import com.google.common.base.Predicates; +import com.google.common.collect.ImmutableList; import java.util.Collections; import java.util.Iterator; @@ -314,12 +315,13 @@ public class Iterators { *

* That is, this creates {A,B,C,D} from {A,B},{C,D}. */ + @SafeVarargs public static Iterable sequence( final Iterable... iterables ) { return new Iterable() { public Iterator iterator() { - return new FlattenIterator>(Arrays.asList(iterables)) { + return new FlattenIterator>(ImmutableList.copyOf(iterables)) { protected Iterator expand(Iterable iterable) { - return cast(iterable).iterator(); + return Iterators.cast(iterable).iterator(); } }; } @@ -350,8 +352,9 @@ public class Iterators { }; } + @SafeVarargs public static Iterator sequence(Iterator... iterators) { - return com.google.common.collect.Iterators.concat(iterators); + return com.google.common.collect.Iterators.concat(iterators); } /** diff --git a/core/src/main/java/jenkins/model/InterruptedBuildAction.java b/core/src/main/java/jenkins/model/InterruptedBuildAction.java index b5f9c6b6f5..c734d58bbb 100644 --- a/core/src/main/java/jenkins/model/InterruptedBuildAction.java +++ b/core/src/main/java/jenkins/model/InterruptedBuildAction.java @@ -43,7 +43,7 @@ public class InterruptedBuildAction extends InvisibleAction { private final List causes; public InterruptedBuildAction(Collection causes) { - this.causes = ImmutableList.copyOf(causes); + this.causes = ImmutableList.copyOf(causes); } @Exported From 0b471b7b693eb370c52c82382257419a07171f93 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Wed, 21 Dec 2016 18:01:46 -0500 Subject: [PATCH 6/8] [SECURITY-353] Fixed markup formatter for StringParameterDefinition/Value. --- .../main/java/hudson/model/ParameterValue.java | 18 ++++++++++++++++++ .../StringParameterDefinition/index.jelly | 3 ++- .../model/StringParameterValue/value.jelly | 3 ++- .../test/java/hudson/model/ParametersTest.java | 2 -- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/hudson/model/ParameterValue.java b/core/src/main/java/hudson/model/ParameterValue.java index d3b39f614a..fbea3895fd 100644 --- a/core/src/main/java/hudson/model/ParameterValue.java +++ b/core/src/main/java/hudson/model/ParameterValue.java @@ -31,11 +31,16 @@ import hudson.scm.SCM; import hudson.tasks.BuildWrapper; import hudson.tasks.Builder; import hudson.util.VariableResolver; +import java.io.IOException; import java.io.Serializable; import java.util.Map; +import java.util.logging.Logger; +import jenkins.model.Jenkins; import net.sf.json.JSONObject; +import org.kohsuke.accmod.Restricted; +import org.kohsuke.accmod.restrictions.DoNotUse; import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.export.Exported; @@ -70,6 +75,9 @@ import org.kohsuke.stapler.export.ExportedBean; */ @ExportedBean(defaultVisibility=3) public abstract class ParameterValue implements Serializable { + + private static final Logger LOGGER = Logger.getLogger(ParameterValue.class.getName()); + protected final String name; private String description; @@ -91,6 +99,16 @@ public abstract class ParameterValue implements Serializable { this.description = description; } + @Restricted(DoNotUse.class) // for value.jelly + public String getFormattedDescription() { + try { + return Jenkins.getInstance().getMarkupFormatter().translate(description); + } catch (IOException e) { + LOGGER.warning("failed to translate description using configured markup formatter"); + return ""; + } + } + /** * Name of the parameter. * diff --git a/core/src/main/resources/hudson/model/StringParameterDefinition/index.jelly b/core/src/main/resources/hudson/model/StringParameterDefinition/index.jelly index 2f99f33da9..2c6a20bfbb 100644 --- a/core/src/main/resources/hudson/model/StringParameterDefinition/index.jelly +++ b/core/src/main/resources/hudson/model/StringParameterDefinition/index.jelly @@ -26,7 +26,8 @@ THE SOFTWARE. - + +

diff --git a/core/src/main/resources/hudson/model/StringParameterValue/value.jelly b/core/src/main/resources/hudson/model/StringParameterValue/value.jelly index 961a583d29..e3de9ff09a 100644 --- a/core/src/main/resources/hudson/model/StringParameterValue/value.jelly +++ b/core/src/main/resources/hudson/model/StringParameterValue/value.jelly @@ -26,7 +26,8 @@ THE SOFTWARE. - + + \ No newline at end of file diff --git a/test/src/test/java/hudson/model/ParametersTest.java b/test/src/test/java/hudson/model/ParametersTest.java index 46a89eeb26..fe885e164c 100644 --- a/test/src/test/java/hudson/model/ParametersTest.java +++ b/test/src/test/java/hudson/model/ParametersTest.java @@ -17,7 +17,6 @@ import java.util.regex.Pattern; import org.apache.http.HttpStatus; import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; -import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ErrorCollector; @@ -226,7 +225,6 @@ public class ParametersTest { HtmlFormUtil.submit(form, HtmlFormUtil.getButtonByCaption(form, "Build")); } - @Ignore("TODO build page should mark up param description; parameters page should mark up param description") @Issue("SECURITY-353") @Test public void xss() throws Exception { From ea2ca1c5cb6be5eaeb73ac8401097529d6e5df1a Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Wed, 21 Dec 2016 18:10:10 -0500 Subject: [PATCH 7/8] Extended markup formatter fix to other core parameter types. --- .../hudson/model/BooleanParameterDefinition/index.jelly | 3 ++- .../resources/hudson/model/BooleanParameterValue/value.jelly | 3 ++- .../hudson/model/ChoiceParameterDefinition/index.jelly | 3 ++- .../resources/hudson/model/FileParameterDefinition/index.jelly | 3 ++- .../main/resources/hudson/model/FileParameterValue/value.jelly | 3 ++- .../hudson/model/PasswordParameterDefinition/index.jelly | 3 ++- .../resources/hudson/model/PasswordParameterValue/value.jelly | 3 ++- .../resources/hudson/model/RunParameterDefinition/index.jelly | 3 ++- .../main/resources/hudson/model/RunParameterValue/value.jelly | 3 ++- .../resources/hudson/model/TextParameterDefinition/index.jelly | 3 ++- .../main/resources/hudson/model/TextParameterValue/value.jelly | 3 ++- 11 files changed, 22 insertions(+), 11 deletions(-) diff --git a/core/src/main/resources/hudson/model/BooleanParameterDefinition/index.jelly b/core/src/main/resources/hudson/model/BooleanParameterDefinition/index.jelly index 4a06f79573..b2069b3b67 100644 --- a/core/src/main/resources/hudson/model/BooleanParameterDefinition/index.jelly +++ b/core/src/main/resources/hudson/model/BooleanParameterDefinition/index.jelly @@ -26,7 +26,8 @@ THE SOFTWARE. - + +
diff --git a/core/src/main/resources/hudson/model/BooleanParameterValue/value.jelly b/core/src/main/resources/hudson/model/BooleanParameterValue/value.jelly index 4dd9f679d7..7eaf8be8f6 100644 --- a/core/src/main/resources/hudson/model/BooleanParameterValue/value.jelly +++ b/core/src/main/resources/hudson/model/BooleanParameterValue/value.jelly @@ -26,7 +26,8 @@ THE SOFTWARE. - + + \ No newline at end of file diff --git a/core/src/main/resources/hudson/model/ChoiceParameterDefinition/index.jelly b/core/src/main/resources/hudson/model/ChoiceParameterDefinition/index.jelly index 36795a45f6..60c86d9a24 100644 --- a/core/src/main/resources/hudson/model/ChoiceParameterDefinition/index.jelly +++ b/core/src/main/resources/hudson/model/ChoiceParameterDefinition/index.jelly @@ -26,7 +26,8 @@ THE SOFTWARE. - + +
diff --git a/core/src/main/resources/hudson/model/FileParameterValue/value.jelly b/core/src/main/resources/hudson/model/FileParameterValue/value.jelly index 4c5c35c1d4..0afcb71564 100644 --- a/core/src/main/resources/hudson/model/FileParameterValue/value.jelly +++ b/core/src/main/resources/hudson/model/FileParameterValue/value.jelly @@ -26,7 +26,8 @@ THE SOFTWARE. - + + diff --git a/core/src/main/resources/hudson/model/PasswordParameterDefinition/index.jelly b/core/src/main/resources/hudson/model/PasswordParameterDefinition/index.jelly index 9bac23608c..bf5db564fa 100644 --- a/core/src/main/resources/hudson/model/PasswordParameterDefinition/index.jelly +++ b/core/src/main/resources/hudson/model/PasswordParameterDefinition/index.jelly @@ -26,7 +26,8 @@ THE SOFTWARE. - + +
diff --git a/core/src/main/resources/hudson/model/PasswordParameterValue/value.jelly b/core/src/main/resources/hudson/model/PasswordParameterValue/value.jelly index d1a142f2db..e4a5007730 100644 --- a/core/src/main/resources/hudson/model/PasswordParameterValue/value.jelly +++ b/core/src/main/resources/hudson/model/PasswordParameterValue/value.jelly @@ -26,7 +26,8 @@ THE SOFTWARE. - + + \ No newline at end of file diff --git a/core/src/main/resources/hudson/model/RunParameterDefinition/index.jelly b/core/src/main/resources/hudson/model/RunParameterDefinition/index.jelly index 62dbc44469..db37d683d3 100644 --- a/core/src/main/resources/hudson/model/RunParameterDefinition/index.jelly +++ b/core/src/main/resources/hudson/model/RunParameterDefinition/index.jelly @@ -26,7 +26,8 @@ THE SOFTWARE. - + +
diff --git a/core/src/main/resources/hudson/model/TextParameterValue/value.jelly b/core/src/main/resources/hudson/model/TextParameterValue/value.jelly index 5c089e0ac0..8ae92827ad 100644 --- a/core/src/main/resources/hudson/model/TextParameterValue/value.jelly +++ b/core/src/main/resources/hudson/model/TextParameterValue/value.jelly @@ -26,7 +26,8 @@ THE SOFTWARE. - + + \ No newline at end of file From 169056e7621eee5dc1de307f53c7c5eb321b707a Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Tue, 3 Jan 2017 12:48:26 -0500 Subject: [PATCH 8/8] Documenting existence of escapeEntryTitleAndDescription flag as suggested by @daniel-beck. --- core/src/main/resources/lib/form/entry.jelly | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/resources/lib/form/entry.jelly b/core/src/main/resources/lib/form/entry.jelly index b8d8a38e3b..0b1c06d1f1 100644 --- a/core/src/main/resources/lib/form/entry.jelly +++ b/core/src/main/resources/lib/form/entry.jelly @@ -33,7 +33,7 @@ THE SOFTWARE. Name of the entry. Think of this like a label for the control. - This content is HTML. Use h.escape if necessary. + This content is HTML (unless the boolean variable escapeEntryTitleAndDescription is set). Use h.escape if necessary. Used for the databinding. TBD. When this attribute @@ -49,7 +49,7 @@ THE SOFTWARE. is somewhat de-emphasized, in favor of the inline foldable help page specified via @help. - This content is HTML. Use h.escape if necessary. + This content is HTML (unless the boolean variable escapeEntryTitleAndDescription is set). Use h.escape if necessary. URL to the HTML page. When this attribute is specified, the entry gets