Skip to content
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

JENKINS-55710, #28 - Fix icon upload iframe in global config #36

Merged
merged 4 commits into from
Feb 17, 2022
Merged

JENKINS-55710, #28 - Fix icon upload iframe in global config #36

merged 4 commits into from
Feb 17, 2022

Commits on Feb 12, 2022

  1. pom: Disable resource filtering

    Fix <#28>
    KalleOlaviNiemitalo committed Feb 12, 2022
    Configuration menu
    Copy the full SHA
    b0fac40 View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2022

  1. Reference startUpload view via descriptorByName

    Because SidebarLinkPlugin nowadays extends GlobalConfiguration
    rather than Plugin, Jenkins maps ${rootURL}/plugin/sidebar-link/*
    only to static resources and not to Jelly views like startUpload.jelly.
    Form validation generates URLs that use "descriptorByName",
    so let's use that for the upload iframe as well.
    
    (Descriptor.getDescriptorUrl would return that string,
    but the risk of bugs seems lower if I just hardcode it.)
    KalleOlaviNiemitalo committed Feb 13, 2022
    Configuration menu
    Copy the full SHA
    2df9a3c View commit details
    Browse the repository at this point in the history
  2. Use l:layout in startUpload.jelly

    layout.jelly will add data-crumb-header and data-crumb-value
    attributes to the head element, and include behavior.js,
    which should then add the anti-CSRF crumb as a hidden field
    to the HTML form.
    
    Fix JENKINS-55710
    KalleOlaviNiemitalo committed Feb 13, 2022
    Configuration menu
    Copy the full SHA
    e92770a View commit details
    Browse the repository at this point in the history
  3. Fix URL of file upload action

    action="upload" in startUpload.jelly attempted to call the
    SidebarLinkPlugin.doUpload method, but that was renamed to
    doUploadLinkImage in commit 3ef9756
    during the CasC work, so we need to use action="uploadLinkImage".
    KalleOlaviNiemitalo committed Feb 13, 2022
    Configuration menu
    Copy the full SHA
    4f35c1a View commit details
    Browse the repository at this point in the history