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

[BUG] FTP contents invisible #2423

Closed
1 task done
dio-lt opened this issue Sep 20, 2023 · 3 comments
Closed
1 task done

[BUG] FTP contents invisible #2423

dio-lt opened this issue Sep 20, 2023 · 3 comments
Labels

Comments

@dio-lt
Copy link

dio-lt commented Sep 20, 2023

Checks

  • I have read the FAQ section, searched the open issues, and still think this is a new bug.

Describe the bug you encountered:

I would like to use a database file that I am storing on my FTP storage (Router with Padavan 3.4.3.9L). If I attempt to open a file with an "FTP" storage type and enter the login data, the storage opens successfully, but it appears empty. Other software is able to see the FTP contents, including desktop KeePass 2.54.

I tried another random FTP server and I am able to see the contents, so it's just my FTP.

Here are the details that will allow you to reproduce the issue:

Samsung Galaxy S22+ on Android 13. Tried both the latest Keepass2Android release and beta versions, but the behavior is the same.

Describe what you expected to happen:

I am able to access a database on my FTP.

What version of Keepass2Android are you using?

1.09e-r7

Which version of Android are you on?

13

@dio-lt dio-lt added the bug label Sep 20, 2023
hyproman added a commit to hyproman/keepass2android that referenced this issue Oct 7, 2023
-Update to latest FluentFTP
-Enable all FluentFTP debug logging to KP2A logger
-Add a lot of intermediate KP2A debug logs
-Try to resolve/handle symlinks (code currently crashes with NPE)

Changing the working directory and doing a GetListing on the current
directory seems to work, whereas GetListing(path) does not always list
the files/directories?? Confirmed this behavior with ncftp client, but
only on one server. Current theory is that the server somehow does not
implement the LIST command properly.

Apart from the debugging mess and the symlink logic issue, the
filechooser breadcrumb bar seems to mess up intermediate directory
names. Need to confirm whether that is existing or new behavior.
hyproman added a commit to hyproman/keepass2android that referenced this issue Oct 7, 2023
Change working directory to target path and call GetListing on
current directory instead of calling GetListing on explicit path.

For some reason GetListing(path) does not always return the contents of
the directory. However, calling SetWorkingDirectory(path) followed by
GetListing(null, options) to list the contents of the working directory
does consistently work.

Similar behavior was confirmed using ncftp client. I suspect this is a
strange bug/nuance in the server's implementation of the LIST command?
@hyproman
Copy link
Contributor

hyproman commented Oct 8, 2023

I was able to reproduce this using your test server account (thanks for that; I think it would be been impossible to figure this out otherwise!). It's a strange one; I could not duplicate the issue on another FTP server, but I did confirm that it could be reproduced on your server, using a different client (ncftp). I'm honestly not sure what to make of it. I'm curious what software/version of FTP server you are running (I could not reproduce with vsftpd on Ubuntu 22.04).

Anyway, PR #2434 seems to have fixed it up. You'll just need to wait for that to be merged into the mainline, and then a new release built (unfortunately those things are out of my control).

If you're feeling adventurous and want to try out the debug build that includes this fix, the APK can be found here. Keep in mind that it is built from master, which may or may not be as stable as the current release...

hyproman added a commit to hyproman/keepass2android that referenced this issue Oct 8, 2023
Change working directory to target path and call GetListing on
current directory instead of calling GetListing on explicit path.

For some reason GetListing(path) does not always return the contents of
the directory. However, calling SetWorkingDirectory(path) followed by
GetListing(null, options) to list the contents of the working directory
does consistently work.

Similar behavior was confirmed using ncftp client. I suspect this is a
strange bug/nuance in the server's implementation of the LIST command?
hyproman added a commit to hyproman/keepass2android that referenced this issue Oct 8, 2023
Change working directory to target path and call GetListing on
current directory instead of calling GetListing on explicit path.

For some reason GetListing(path) does not always return the contents of
the directory. However, calling SetWorkingDirectory(path) followed by
GetListing(null, options) to list the contents of the working directory
does consistently work.

Similar behavior was confirmed using ncftp client. I suspect this is a
strange bug/nuance in the server's implementation of the LIST command?
@karolis-aispeco
Copy link

Hi hyproman. The server is running on a Xiaomi MI-3 router with Padavan 3.4.3.9L-101 firmware. Underneath it seems to be vsftpd 3.0.3 on BusyBox 1.31.1 if that helps.

PhilippC added a commit that referenced this issue Oct 31, 2023
@PhilippC
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants