Skip to content

Wrong regex in FtpFile #2

@JuKu

Description

@JuKu

Hi,

if you use a ftp server with "@" in usernames (which is default on Froxlor + proftpd), the regex in class FtpFile doesn't matches:

02:44:58.628 [vert.x-eventloop-thread-0] ERROR java.io.File - line drwxr-xr-x   2 ftp1@example.com EXAMPLE       4096 Dec 15 00:38 client does not match dir re

The problem is this line in class FtpFile:

private static Pattern filere = Pattern.compile("(.)......... +\\d+ +\\d+ +\\d+ +(\\d+) ([A-Z][a-z][a-z] +\\d+ +(?:(?:\\d\\d:\\d\\d)|(?:\\d+))) (.*)");

Here, we have to add the "@" in [A-Z][a-z][a-z].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions