Skip to content

Remove getBySHA1 REST API obsoleted by SECURITY-595#644

Merged
MarkEWaite merged 1 commit intojenkinsci:masterfrom
MarkEWaite:remove-getBySHA1-REST-API
Dec 9, 2018
Merged

Remove getBySHA1 REST API obsoleted by SECURITY-595#644
MarkEWaite merged 1 commit intojenkinsci:masterfrom
MarkEWaite:remove-getBySHA1-REST-API

Conversation

@MarkEWaite
Copy link
Copy Markdown
Contributor

@MarkEWaite MarkEWaite commented Dec 8, 2018

SECURITY-595 - Remove obsolete REST API

The SECURITY-595 security fix for Jenkins core prevents access to the URL /job//scm/. That prevents access to …/scm/bySHA1/…. That change breaks this undocumented feature.

Since Git plugin 4.0 is a major release, let's use the major release to remove this unusable API.

Checklist

  • I have read the CONTRIBUTING doc
  • I have referenced the Jira issue related to my changes in one or more commit messages
  • Unit tests pass locally with my changes
  • I have added documentation as necessary (will add to git plugin release notes / change log)
  • No Javadoc warnings were introduced with my changes
  • No findbugs warnings were introduced with my changes
  • I have interactively tested my changes

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Further comments

If we find a critical need to provide this REST API, it can be reinstated on the Descriptor. Descriptors are already involved in URL handling and will work out of the box.

The SECURITY-595 security fix for Jenkins core prevents access to the URL
/job/<Job Name here>/scm/. That prevents access to …/scm/bySHA1/….
That change breaks this undocumented feature with no test coverage.

Since Git plugin 4.0 is a major release, let's use the major release to
remove this unusable API.

If we find a critical need to provide this REST API, it can be moved to
the Descriptor.  Descriptors are already involved in URL handling and
will work out of the box.
@MarkEWaite MarkEWaite force-pushed the remove-getBySHA1-REST-API branch from b83dbdb to eab515e Compare December 9, 2018 17:34
Copy link
Copy Markdown
Member

@daniel-beck daniel-beck left a comment

Choose a reason for hiding this comment

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

Works for me.

If there's actual demand for this, we can always restore it as /job/whatever/descriptor/hudson.plugins.git.GitSCM/bySHA1/<SHA-1> (via GitSCM's Descriptor) or job/whatever/byGitSHA1/<SHA-1> (via TransientActionFactory). Both are pretty straightforward.

@MarkEWaite MarkEWaite merged commit 7ac6f35 into jenkinsci:master Dec 9, 2018
@MarkEWaite MarkEWaite deleted the remove-getBySHA1-REST-API branch December 9, 2018 20:33
@daniel-beck
Copy link
Copy Markdown
Member

Updated https://wiki.jenkins.io/display/JENKINS/Plugins+affected+by+the+SECURITY-595+fix with a notice that the feature is being removed from the plugin.

@MarkEWaite
Copy link
Copy Markdown
Contributor Author

Thanks @daniel-beck !

@MarkEWaite MarkEWaite added this to the 4.0 milestone Dec 11, 2018
@MarkEWaite MarkEWaite added the skip-changelog Exclude from the changelog label Jul 13, 2019
@MarkEWaite MarkEWaite added bugfix Fixes a bug - used by Release Drafter and removed skip-changelog Exclude from the changelog labels Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fixes a bug - used by Release Drafter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants