-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to commons-beanutils:1.9.4 without disabling the protection #211
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
jelly/src/main/java/org/kohsuke/stapler/jelly/AttributeNameRewritingTagScript.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've had riskier workarounds in the past.
Co-Authored-By: Basil Crow <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes good sense and is the best proposal about how to move forward and upgrade to the new version. We can't just allow ourselves to remain on the old version and be blocked from continuing forward.
Hopefully this will work. If it doesn't there is a sufficient amount of escape hatches and configuration to allow people with other scenarios to continue while we correct anything additional that might arise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Very nice change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks right. Kudos to the Jelly team and @jstrachan for such extensibility
Who's able to merge this PR @daniel-beck, @oleg-nenashev? It has enough approvals for a few days already. The permission updater repo doesn't mention any maintainer: https://github.com/jenkins-infra/repository-permissions-updater/blob/master/permissions/component-stapler.yml |
That's explained in the linked file in a comment. @jglick Please hold off releasing for another week until we've merged in changes from the upcoming security update (merging is fine though). |
Just let me know when you want a release. |
Why can't we just release and hold-off updating this into Jenkins Core? |
Because there's a privately staged new release of Stapler. That release you're asking for would never be in a core update anyway (and if it were it'd be a pretty big regression over next week's core release for absolutely no reason). |
This pull request attempts to update to
commons-beanutils:1.9.4
without disabling the additional protection it offers around theclass
attribute.It seems in my (fairly limited so far) testing that the problem is
st:include
'sclass
attribute. So this pull request renames the attribute toclazz
(and keeps the existing setter for compatibility).This PR additionally proposes a workaround that applies when Jelly files are being parsed and the resulting tags are created: For the
st:include
tag, when theclass
attribute would be set, instead setclazz
. This attempts to take care of all existing code that sets theclass
attribute for this tag.I am unsure how best to go about ensuring this doesn't cause a lot of problems. While this fix looks fairly safe, it may also be incomplete. In the short term, #209 seems like the safer approach.
CC @basil