JENKINS-54273: RAW HTML is shown in maven deployment links since 2.138.2#5
JENKINS-54273: RAW HTML is shown in maven deployment links since 2.138.2#5bguerin wants to merge 1 commit into
Conversation
|
I recommend a detailed security review before merging this. A similar PR (re-)introduced a security vulnerability in another plugin, as the input was not actually safe. |
|
In this plugin the html passed to j:out is built inside the plugin itself : |
|
Please think about the data flow here. The Build script that works on any Linux/Unix: |
ddc860c to
3e44fe1
Compare
|
@daniel-beck added a java.net.URL parsing, if it fails, url will be escaped |
|
To bypass the protection in 3e44fe1: Unfortunately I'm out of time here, so will not be able to test further attempts to fix this. FWIW the approach in the plugin appears to be flawed and too cumbersome to make work, it should instead just add the links from the raw data in Jelly, rather than to insert a blob of questionable HTML. |
|
Agree with your point of view, I did not choose this way at first glance to avoid too many changes. |
3e44fe1 to
5f5ffe5
Compare
|
PR reworked as suggested by @daniel-beck , his last attack is now harmless |
| ${it.latestDeployments.text} | ||
| <ul> | ||
| <j:forEach items="${it.latestDeployments.deployments}" var="deployment"> | ||
| <li><a href="${deployment.url}">${deployment.name}</a></li> |
There was a problem hiding this comment.
This does not disallow URLs with javascript: scheme, so I expect there's still an XSS vulnerability here.

No description provided.