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

Crash when open directoy with @ sign #3792

Open
Offerel opened this issue Apr 29, 2023 · 9 comments
Open

Crash when open directoy with @ sign #3792

Offerel opened this issue Apr 29, 2023 · 9 comments
Assignees
Labels
Area-Ssh/Scp/Sftp Issue-Bug Related unexpected behavior or something worth investigating.
Milestone

Comments

@Offerel
Copy link

Offerel commented Apr 29, 2023

Describe the bug
On my SFTP server, i have folders where the name of the folder contains an @ sign. If i open this folder with Amaze Filemanager, it crashes.

To Reproduce
Steps to reproduce the behavior:

  1. Create SFTP connection
  2. Open the connection
  3. Open folder
  4. Open folder with a @ sign in name
  5. App crashes

Expected behavior
Folder can be opened

Smartphone (please complete the following information):

  • Device: Galaxy S23+
  • OS: Android 13
  • Rooted: [No]
  • Version: [3.8.4]

Additional context
If I create a symlink to the same folder, without the @ sign, i can open the folder. I don't know, if other signs are effected also.

java.lang.RuntimeException: An error occurred while executing doInBackground()
	at android.os.AsyncTask$4.done(AsyncTask.java:415)
	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:381)
	at java.util.concurrent.FutureTask.setException(FutureTask.java:250)
	at java.util.concurrent.FutureTask.run(FutureTask.java:269)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
	at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.StringIndexOutOfBoundsException: begin 104, end 10, length 115
	at java.lang.String.checkBoundsBeginEnd(String.java:3942)
	at java.lang.String.substring(String.java:2467)
	at com.amaze.filemanager.filesystem.ftp.NetCopyClientConnectionPool$ConnectionInfo.<init>(NetCopyClientConnectionPool.kt:406)
	at com.amaze.filemanager.filesystem.ftp.NetCopyClientConnectionPool.createSshClient(NetCopyClientConnectionPool.kt:252)
	at com.amaze.filemanager.filesystem.ftp.NetCopyClientConnectionPool.access$createSshClient(NetCopyClientConnectionPool.kt:48)
	at com.amaze.filemanager.filesystem.ftp.NetCopyClientConnectionPool$createNetCopyClient$1.invoke(NetCopyClientConnectionPool.kt:175)
	at com.amaze.filemanager.filesystem.ftp.NetCopyClientConnectionPool$createNetCopyClient$1.invoke(NetCopyClientConnectionPool.kt:173)
	at com.amaze.filemanager.filesystem.ftp.NetCopyClientConnectionPool.getConnection(NetCopyClientConnectionPool.kt:88)
	at com.amaze.filemanager.filesystem.ftp.NetCopyClientUtils.execute(NetCopyClientUtils.kt:83)
	at com.amaze.filemanager.filesystem.HybridFile.forEachChildrenFile(HybridFile.java:938)
	at com.amaze.filemanager.asynchronous.asynctasks.LoadFilesListTask.listSftp(LoadFilesListTask.java:626)
	at com.amaze.filemanager.asynchronous.asynctasks.LoadFilesListTask.doInBackground(LoadFilesListTask.java:157)
	at com.amaze.filemanager.asynchronous.asynctasks.LoadFilesListTask.doInBackground(LoadFilesListTask.java:85)
	at android.os.AsyncTask$3.call(AsyncTask.java:394)
	at java.util.concurrent.FutureTask.run(FutureTask.java:264)
	... 3 more

@Offerel
Copy link
Author

Offerel commented Apr 29, 2023

Update: When i manually enter the directory name and us %40 instead of @, i can access the directory. But clicking such a directory leads to a crash. I have no skills in Java programming, but i assume, the filenames should properly urlencoded. Then it should work.

@VishnuSanal VishnuSanal added Issue-Bug Related unexpected behavior or something worth investigating. Area-Ssh/Scp/Sftp labels Apr 30, 2023
@TranceLove TranceLove self-assigned this Apr 30, 2023
@TranceLove
Copy link
Collaborator

TranceLove commented Apr 30, 2023

Should be fixed by #3661 for 4.0. Let's see it.

device-2023-04-30-132251

@TranceLove TranceLove added this to the v4.0 milestone Apr 30, 2023
@Offerel
Copy link
Author

Offerel commented May 2, 2023

Is there any release or pre-release date or can be downloaded from github actions?

@VishalNehra
Copy link
Member

Is there any release or pre-release date or can be downloaded from github actions?

You can download from this github action. Release date isn't yet set.

@VishalNehra
Copy link
Member

Is there any release or pre-release date or can be downloaded from github actions?

You can also join our telegram channel for the apk. https://t.me/TeamAmaze

@Offerel
Copy link
Author

Offerel commented May 2, 2023

Many thx. After testing, my issue with the @ sign is solved in this version. But a other dorectory is listed as empty. If I look at the server, this seems to be a bind mount. I'm not sure if this is responsible for not displaying the directory content. I will try to find the reason tomorrow.

Other file managers like Solid Explorer and Material Files can list the content of the directory. I will report if I find more info.

@VishalNehra
Copy link
Member

Many thx. After testing, my issue with the @ sign is solved in this version. But a other dorectory is listed as empty. If I look at the server, this seems to be a bind mount. I'm not sure if this is responsible for not displaying the directory content. I will try to find the reason tomorrow.

Other file managers like Solid Explorer and Material Files can list the content of the directory. I will report if I find more info.

@TranceLove

@Offerel
Copy link
Author

Offerel commented May 2, 2023

Additionally hint: when I download a file via SFTP (SCP is not allowed there), the speed seems to be slow. I get around 4MB/s, the same as with Material Files. With Solid Explorer and the same connection and file, i have around 8MB/s. I haven't tested SCP for now.

@Offerel
Copy link
Author

Offerel commented May 3, 2023

Many thx. After testing, my issue with the @ sign is solved in this version. But a other dorectory is listed as empty. If I look at the server, this seems to be a bind mount. I'm not sure if this is responsible for not displaying the directory content. I will try to find the reason tomorrow.

Other file managers like Solid Explorer and Material Files can list the content of the directory. I will report if I find more info.

I have found more. Its not this special directory. If i open this directory directly after logging in, all is fine. However, when i have accessed a folder with this new version and i go back or up a directory, this appears as empty. All folders appears as empty, when i go back or up one level. Maybe its only a listing-refresh issue?

@TranceLove TranceLove reopened this May 3, 2023
Chingk26 added a commit to Chingk26/AmazeFileManager that referenced this issue Dec 24, 2023
@VishalNehra VishalNehra modified the milestones: v3.9, v4.0 Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Ssh/Scp/Sftp Issue-Bug Related unexpected behavior or something worth investigating.
Projects
None yet
Development

No branches or pull requests

4 participants