Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-8864

CIFS copy fails if Share Name has spaces or slash ("/") characters

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • cifs-plugin
    • None
    • CIFS 1.1.13
      Windows XP SP3

      When inputting a Share Name with spaces or slashes in the name, the share URL replaces spaces with %20 and / with %2F and the CIFS copy fails. URL looks like:
      smb://domain;username@machine/Build%20Archive%2Fincoming%2F
      Expected URL would be:
      smb://domain;username@machine/Build Archive/incoming/

          [JENKINS-8864] CIFS copy fails if Share Name has spaces or slash ("/") characters

          Darth Vader added a comment -

          Our reasoning is that we would enter the parametrized share name once and then select it from the drop down menu when configuring a project which is much less error prone.
          I guess our request could also be to have standard destinations for a given share that would be configured in the global settings at the same time as the share. The share and the standard destinations would then be selected from drop down menus.

          Darth Vader added a comment - Our reasoning is that we would enter the parametrized share name once and then select it from the drop down menu when configuring a project which is much less error prone. I guess our request could also be to have standard destinations for a given share that would be configured in the global settings at the same time as the share. The share and the standard destinations would then be selected from drop down menus.

          Alex Earl added a comment -

          This is not currently how the plugin works. The share name entered on the global configuration page is THE share name, there should not be any additional path information. This is why slashes, et al, are getting escaped right now. Please open a separate request for the feature and I will debug the share name with space for this specific case.

          Alex Earl added a comment - This is not currently how the plugin works. The share name entered on the global configuration page is THE share name, there should not be any additional path information. This is why slashes, et al, are getting escaped right now. Please open a separate request for the feature and I will debug the share name with space for this specific case.

          Alex Earl added a comment -

          Found that only the domain, username and password need to be URL encoded. So, I removed the URL encoding on the rest of the URL. Slashes in share names may still not work, but you filed a new issue on that request for default shares with variables.

          Alex Earl added a comment - Found that only the domain, username and password need to be URL encoded. So, I removed the URL encoding on the rest of the URL. Slashes in share names may still not work, but you filed a new issue on that request for default shares with variables.

          Darth Vader added a comment -

          I will close the issue after testing that Shares with spaces work on my setup. For the slashes, that is correct, I opened a separate issue for default shares with variables in the names JENKINS-8879

          Darth Vader added a comment - I will close the issue after testing that Shares with spaces work on my setup. For the slashes, that is correct, I opened a separate issue for default shares with variables in the names JENKINS-8879

          Alex Earl added a comment -

          I'll probably do a release on Monday, the default shares will take more time and I'd like to get this bug closed out.

          Alex Earl added a comment - I'll probably do a release on Monday, the default shares will take more time and I'd like to get this bug closed out.

          Darth Vader added a comment -

          Agreed. The two features are independent and I will close this one when I test it with the new release.

          Darth Vader added a comment - Agreed. The two features are independent and I will close this one when I test it with the new release.

          Darth Vader added a comment -

          Any update on the release which fixes the default shares with spaces so I can close out this bug?

          Darth Vader added a comment - Any update on the release which fixes the default shares with spaces so I can close out this bug?

          Alex Earl added a comment -

          Ah! I thought I had pushed the 1.1.14 release. I'll do that as soon as I can.

          Alex Earl added a comment - Ah! I thought I had pushed the 1.1.14 release. I'll do that as soon as I can.

          Code changed in jenkins
          User: slide
          Path:
          src/main/java/com/slide/hudson/plugins/CIFSShare.java
          http://jenkins-ci.org/commit/cifs-plugin/3e4bc02972572b9964b0cee27bf97c8c796561e7
          Log:
          Fixed JENKINS-8864

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: slide Path: src/main/java/com/slide/hudson/plugins/CIFSShare.java http://jenkins-ci.org/commit/cifs-plugin/3e4bc02972572b9964b0cee27bf97c8c796561e7 Log: Fixed JENKINS-8864

          Darth Vader added a comment -

          Tested on Windows XP with a Windows Share with a name using the cifs 1.1.14 and worked.

          Darth Vader added a comment - Tested on Windows XP with a Windows Share with a name using the cifs 1.1.14 and worked.

            slide_o_mix Alex Earl
            dvader Darth Vader
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: