Uploaded image for project: 'Commons VFS'
  1. Commons VFS
  2. VFS-14

[VFS] sftp: Url parsing fails with special characters in password part

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • Operating System: other
      Platform: Other

    • 39152

    Description

      When trying to access a file from an url with for example a question mark in
      the password:

      "sftp://myuser:test%3Fpwd@127.0.0.1/"

      I get this stack trace:
      org.apache.commons.vfs.FileSystemException: Port number is missing from
      URI "sftp://myuser:test?pwd@127.0.0.1//".
      at org.apache.commons.vfs.provider.HostFileNameParser.extractPort
      (HostFileNameParser.java:228)
      at org.apache.commons.vfs.provider.HostFileNameParser.extractToPath
      (HostFileNameParser.java:133)
      at org.apache.commons.vfs.provider.URLFileNameParser.parseUri
      (URLFileNameParser.java:47)
      at org.apache.commons.vfs.provider.AbstractFileProvider.parseUri
      (AbstractFileProvider.java:167)
      at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveName
      (DefaultFileSystemManager.java:628)
      at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveName
      (DefaultFileSystemManager.java:563)
      at
      org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile
      (AbstractOriginatingFileProvider.java:71)
      at
      org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile
      (AbstractOriginatingFileProvider.java:61)
      at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile
      (DefaultFileSystemManager.java:524)
      at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile
      (DefaultFileSystemManager.java:468)
      at com.tmobile.so.collector.VFSMoverFile.<init>(VFSMoverFile.java:125)
      ....

      I was using VFS rc7 from the subversion repository tag.

      Attachments

        Activity

          People

            Unassigned Unassigned
            gernot.eger@t-mobile.at Gernot Eger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: