Skip to content

Commit

Permalink
[SECURITY-1186] Integration tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dwnusbaum authored and jglick committed Oct 18, 2018
1 parent b556b7c commit e1c56eb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<git-plugin.version>3.1.0</git-plugin.version>
<workflow-support-plugin.version>2.21</workflow-support-plugin.version>
<scm-api-plugin.version>2.2.6</scm-api-plugin.version>
<groovy-cps.version>1.24</groovy-cps.version>
<groovy-cps.version>1.25</groovy-cps.version>
<structs-plugin.version>1.17</structs-plugin.version>
</properties>
<dependencies>
Expand All @@ -97,7 +97,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>script-security</artifactId>
<version>1.46</version>
<version>1.48</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -522,4 +522,18 @@ public void transformedSuperClass() throws Exception {
WorkflowRun r = jenkins.buildAndAssertSuccess(job);
jenkins.assertLogContains("OUTPUT: ybase", r);
}

@Issue("SECURITY-1186")
@Test
public void finalizer() throws Exception {
WorkflowJob p = jenkins.jenkins.createProject(WorkflowJob.class, "p");
p.setDefinition(new CpsFlowDefinition("class Foo {\n" +
" @Override public void finalize() {\n" +
" }\n" +
"}\n" +
"echo 'Should never get here'", true));
WorkflowRun b = jenkins.assertBuildStatus(Result.FAILURE, p.scheduleBuild2(0));
jenkins.assertLogContains("Object.finalize()", b);
jenkins.assertLogNotContains("Should never get here", b);
}
}

0 comments on commit e1c56eb

Please sign in to comment.