Giter VIP home page Giter VIP logo

vfsjfilechooser2's Introduction

vfsjfilechooser2

vfsjfilechooser2 is a mavenized fork of the dormant vfsjfilechooser project on sf.net (https://sourceforge.net/projects/vfsjfilechooser/).

It is an alternative to Java's JFileChooser Swing component, which does not suffer from the JFileChooser's infamous "freezes" on Windows (http://bugs.sun.com/view_bug.do?bug_id=6372808).

It has been updated to work with version 2.0 of the VFS Apache commons and includes a few bugfixes and enhancements.

Developers of the original project:

  • stanlove
  • stephanschuster
  • worse
  • yveszoundi

The project is licensed under the Apache Software License, Version 2.0 (see LICENSE.txt for details).

How to include the artifact in your project:

    <dependency>
      <groupId>com.github.fracpete</groupId>
      <artifactId>vfsjfilechooser2</artifactId>
      <version>0.2.9</version>
    </dependency>

Current project page:

https://github.com/fracpete/vfsjfilechooser2

vfsjfilechooser2's People

Contributors

dependabot[bot] avatar fracpete avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vfsjfilechooser2's Issues

Constructor fails with non-file FileObject

What steps will reproduce the problem?
1. Create a FileObject which is not backed by a file:/// URI 
2. Create a VFSJFileChooser(FileObject)

    java.lang.IllegalArgumentException: URI scheme is not "file"
        at java.io.File.<init>(File.java:395)
        at com.googlecode.vfsjfilechooser2.utils.DefaultFileObjectConverter.convertFileObject(DefaultFileObjectConverter.java:51)
        at com.googlecode.vfsjfilechooser2.VFSJFileChooser.getCurrentDirectory(VFSJFileChooser.java:541)
        at com.googlecode.vfsjfilechooser2.plaf.metal.MetalVFSFileChooserUI$DirectoryComboBoxAction.actionPerformed(MetalVFSFileChooserUI.java:1569)
        at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1260)
        at javax.swing.JComboBox.setSelectedItem(JComboBox.java:588)
        at com.googlecode.vfsjfilechooser2.plaf.metal.MetalVFSFileChooserUI.doDirectoryChanged(MetalVFSFileChooserUI.java:804)
        at com.googlecode.vfsjfilechooser2.plaf.metal.MetalVFSFileChooserUI.access$600(MetalVFSFileChooserUI.java:94)
        at com.googlecode.vfsjfilechooser2.plaf.metal.MetalVFSFileChooserUI$6.propertyChange(MetalVFSFileChooserUI.java:958)
        at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
        at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
        at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
        at java.awt.Component.firePropertyChange(Component.java:8382)
        at com.googlecode.vfsjfilechooser2.VFSJFileChooser.setCurrentDirectoryObject(VFSJFileChooser.java:635)
        at com.googlecode.vfsjfilechooser2.VFSJFileChooser.<init>(VFSJFileChooser.java:229)
        at com.googlecode.vfsjfilechooser2.VFSJFileChooser.<init>(VFSJFileChooser.java:209)

Defeats the point, a little. :-(

Original issue reported on code.google.com by [email protected] on 6 Jan 2014 at 6:49

Connection with Key Authentication and SSH proxy server.

Hi. Thanks for the excellent work. I have two feature requests for the vfsjfilechooser2:
It is strongly desired that the remote host can be connected via SSH Key Authentication. Also, support for SSH proxy server is also grateful.

Depends on junit for runtime, not just test

junit should be a test dependency, not a runtime dependency.

\--- com.googlecode.vfsjfilechooser2:vfsjfilechooser2:0.2.5
     +--- junit:junit:3.8.2 -> 4.8.2
     +--- org.apache.commons:commons-vfs2:2.0
     |    +--- commons-logging:commons-logging:1.1.1
     |    +--- org.apache.maven.scm:maven-scm-api:1.4
     |    |    \--- org.codehaus.plexus:plexus-utils:1.5.6
     |    \--- org.apache.maven.scm:maven-scm-provider-svnexe:1.4
     |         +--- org.apache.maven.scm:maven-scm-provider-svn-commons:1.4
     |         |    +--- org.apache.maven.scm:maven-scm-api:1.4 (*)
     |         |    \--- org.codehaus.plexus:plexus-utils:1.5.6
     |         +--- regexp:regexp:1.3
     |         +--- org.apache.maven.scm:maven-scm-api:1.4 (*)
     |         \--- org.codehaus.plexus:plexus-utils:1.5.6
     \--- commons-io:commons-io:2.1 -> 2.4


Original issue reported on code.google.com by [email protected] on 5 Jan 2014 at 9:26

empty dialog if a file contains backslashes

What steps will reproduce the problem?
1. Create a file with backslashes in the name (on Linux)
2. open file chooser and go to that location

What is the expected output? What do you see instead?
Instead of seeing content of directory, file chooser is empty.


Original issue reported on code.google.com by fracpete on 6 Nov 2012 at 7:51

Add "Rename" to context menu

Add a "Rename" menu item to the context menu of the file chooser dialog, to 
allow renaming of files/folders rather than having to select the item and move 
the mouse cursor to get into edit mode.

Original issue reported on code.google.com by fracpete on 9 Jan 2013 at 1:44

Connecting to SFTP server doesn't work

What steps will reproduce the problem?
1. Connecting to any SFTP server
2. Exception is thrown.

There are a couple of problems here.

1. MetalVFSFileChooserUI incorrectly calls getCurrentDirectory() instead of 
getCurrentDirectoryObject. Related to your File/FileObject changes.
2. This now works correctly, unless you add a path to the ConnectionDialog. 
This is corrected by setting the setUserDirIsRoot configuration to false. Must 
be a change in commons-vfs2 behavior. Empty path still works fine.
3. Unrelated misspellings in code (purely cosmetic)

I can't figure out how to create a patch from hg so I've attached the output of 
a "hg diff". I'd appreciate it if you could patch and release a new version in 
the near future. I've cloned a copy for our internal purposes, which will do 
for the interim. Thanks!!

Rajin 

Original issue reported on code.google.com by [email protected] on 16 Jun 2013 at 11:51

Attachments:

Vulnerable Regular Expression in vfsjfilechooser2

Type of Issue
Potential Regex Denial of Service (ReDoS)

Description
The vulnerable regular expression is located in

The ReDOS vulnerability can be exploited with the following string
ftp://:@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::

You can execute the following code to reproduce ReDos

import com.googlecode.vfsjfilechooser2.utils.VFSURIValidator;

public class Main {
    public static void main(String[] args) {
        VFSURIValidator v = new VFSURIValidator();
        String _uri = "ftp://:@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::@::";
        System.out.println(v.isValid(_uri));
    }
}

I think you can limit the input length or modify this regex.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.