Use Matrix Project Plugin in Security914Test, not Credentials Plugin (#26090)

Fixes #26088

The user interface update to the Credentials plugin in pull request:

* https://github.com/jenkinsci/credentials-plugin/issues/990

removed the image that this test used for its initial configuration.
The change was released in Credentials plugin:

* https://github.com/jenkinsci/credentials-plugin/releases/tag/1460.v48765a_c7d849

The new release of the Credentials plugin was included in Jenkins core
with pull request:

* https://github.com/jenkinsci/jenkins/pull/26046

This change switches from the Credentials plugin to the Matrix Project
plugin as the base for the test.  The assumption is that user interface
changes are less likely to the Matrix Project plugin.

Testing done:

* Confirmed that the tests fail on Windows without this change
* Confirmed that the tests pass on Windows with this change
This commit is contained in:
Mark Waite authored and GitHub committed 2026-01-08 14:14:40 -07:00
1 parent 96f17d5953
commit 402640d91b
1 file changed
+6 -6
@@ -55,12 +55,12 @@ class Security914Test {
void cannotUseInvalidLocale_toTraverseFolder() throws Exception {
assumeTrue(Functions.isWindows());
assertNotNull(j.getPluginManager().getPlugin("credentials"));
j.createWebClient().goTo("plugin/credentials/images/credentials.svg", "image/svg+xml");
assertNotNull(j.getPluginManager().getPlugin("matrix-project"));
j.createWebClient().goTo("plugin/matrix-project/images/matrixproject.svg", "image/svg+xml");
JenkinsRule.WebClient wc = j.createWebClient()
.withThrowExceptionOnFailingStatusCode(false);
WebRequest request = new WebRequest(new URI(j.getURL() + "plugin/credentials/.xml").toURL());
WebRequest request = new WebRequest(new URI(j.getURL() + "plugin/matrix-project/.xml").toURL());
// plugin deployed in: test\target\jenkins7375296945862059919tmp
// rootDir is in : test\target\jenkinsTests.tmp\jenkins1274934531848159942test
// j.jenkins.getRootDir().getName() = jenkins1274934531848159942test
@@ -75,12 +75,12 @@ class Security914Test {
void cannotUseInvalidLocale_toAnyFileInSystem() throws Exception {
assumeTrue(Functions.isWindows());
assertNotNull(j.getPluginManager().getPlugin("credentials"));
j.createWebClient().goTo("plugin/credentials/images/credentials.svg", "image/svg+xml");
assertNotNull(j.getPluginManager().getPlugin("matrix-project"));
j.createWebClient().goTo("plugin/matrix-project/images/matrixproject.svg", "image/svg+xml");
JenkinsRule.WebClient wc = j.createWebClient()
.withThrowExceptionOnFailingStatusCode(false);
WebRequest request = new WebRequest(new URI(j.getURL() + "plugin/credentials/.ini").toURL());
WebRequest request = new WebRequest(new URI(j.getURL() + "plugin/matrix-project/.ini").toURL());
// ../ can be multiply to infinity, no impact, we just need to have enough to reach the root
request.setAdditionalHeader("Accept-Language", "../../../../../../../../../../../../windows/win");