Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIX JENKINS-27496] reconfigure may return null
  • Loading branch information
ndeloof committed Mar 18, 2015
1 parent c415857 commit b78c45c
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -132,7 +132,7 @@ public void setContributors(EnvInjectJobPropertyContributor[] jobPropertyContrib
@Override
public JobProperty<?> reconfigure(StaplerRequest req, JSONObject form) throws Descriptor.FormException {
EnvInjectJobProperty property = (EnvInjectJobProperty) super.reconfigure(req, form);
if (property.info != null && !Jenkins.getInstance().hasPermission(Jenkins.RUN_SCRIPTS)) {
if (property != null && property.info != null && !Jenkins.getInstance().hasPermission(Jenkins.RUN_SCRIPTS)) {
// Don't let non RUN_SCRIPT users set arbitrary groovy script
property.info = new EnvInjectJobPropertyInfo(property.info.propertiesFilePath, property.info.propertiesContent,
property.info.getScriptFilePath(), property.info.getScriptContent(),
Expand Down

6 comments on commit b78c45c

@oleg-nenashev
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ndeloof
Seems #43 is not required anymore :)

@ndeloof
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh indeed, I didn't noticed a PR existed - just edited directly under github for this minor fix

@oleg-nenashev
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem :)
Seems there's a need in a new release (1.91.2?) in any case.

@z0rc
Copy link

@z0rc z0rc commented on b78c45c Apr 9, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any news about the new release? I need this fix too.

@oleg-nenashev
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@z0rc
Igor, thanks for the reminder. I've released the new version; it should become available within several hours.

@oleg-nenashev
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to release the version again (just a common glitch with the old mvn-release plugin version). Everything should be fine now

Please sign in to comment.