Possible bug in FTPS handling of # character

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
CurioCT
New Cone
New Cone
Posts: 4
Joined: 07 Jan 2021 14:51

Possible bug in FTPS handling of # character

Postby CurioCT » 07 Jan 2021 16:10

Hi guys,

New to this forum, though not VLC, so I am not 100% sure this is the right place, I have searched for other posts on the topic

platforms tested - windows and android

Using ftps
I can add the ftps server and accept the self signed certifcate no problem in windows (although this does NOT appear to work on android at this stage I am assuming I need actually install the self-signed cert on android itself, however for this testing it isn't a problem as I can replicate the behaviour experienced without the cert installed on android simply using multiple accepts a little annoying but the actual issue is replicated)

The ftps server in question has several folders which start with the # character in every case where there are further subfolders this causes a recursive loop where vlc will simply list relist the folders from the structure just above the parent . If the folder simply contains files attempting to play the files will also show the recursive file list rather than playing the file. I have also done a little testing with the # elsewhere in the folder name and this causes other errors.

for clarity behaviour exhibited is :-

/
#folder1
....folder
........#folder1 here attempting to list the contents of 'folder' which would have furthre subfolders recurses to list the folders 2 up (in this case root but always 2 up
........folder2
........folder3
#folder2
folder3
....#folder4
........file1.avi in this instance with no subfolders only file the files are listed and when you try to play they recurse the folder listing 'folder3''s contents
........file2.mkv

The third case I tested was a # elsewhere in the folder name which exhibited a different error I got the pop up error message box with the following error message

"Your input can't be opened:
VLC is unable to open the MRL 'ftps://server:port/parent folder/part1 #part2/filename.mp4'. Check the log for details."

running this with full debug logging shows a truncation after 'part1', However, I would need to spend some significant time sanitising the log file before I would be prepared to post it in full

This does not happen in other ftps clients of which I have tested filezilla and kodi extensively which leads me to believe the problem lies with VLC

other than removing all #'s from folder names would anyone know of any fix or work around for this issue? or what process I would need to follow to report this as a bug?

Lotesdelere
Cone Master
Cone Master
Posts: 10074
Joined: 08 Sep 2006 04:39
Location: Europe

Re: Possible bug in FTPS handling of # character

Postby Lotesdelere » 08 Jan 2021 16:10

Try to replace the space character with %20 and the # with %23:

ftps://server:port/parent%20folder/part1%20%23part2/filename.mp4

CurioCT
New Cone
New Cone
Posts: 4
Joined: 07 Jan 2021 14:51

Re: Possible bug in FTPS handling of # character

Postby CurioCT » 09 Jan 2021 20:32

Try to replace the space character with %20 and the # with %23:

ftps://server:port/parent%20folder/part1%20%23part2/filename.mp4
yes fine if you want to play one individual file clearly you can do this but this will not allow you browse an FTPS file system this way, which is where there recursion is occurring (probably due to truncation) unless I am missing something how would I do that in the file browser?

Besides this is not the normal function of ftps ergo it is a bug I believe so I have started collecting the necessary logs and and so on for a bug report

CurioCT
New Cone
New Cone
Posts: 4
Joined: 07 Jan 2021 14:51

Re: Possible bug in FTPS handling of # character

Postby CurioCT » 09 Jan 2021 20:40

hmmm just tried saving a play list and replacing all #'s with %23 this has some limited success as a work around @Lotesdelere

Rémi Denis-Courmont
Developer
Developer
Posts: 15312
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Possible bug in FTPS handling of # character

Postby Rémi Denis-Courmont » 09 Jan 2021 22:32

Well the hash sign is a URL separator. In an FTPS URL, if you want the hash sign as a hash sign character rather than as a separator, you need to encode it. There's a bug, yes, but it seems to be in whichever software generated the playlist file.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

CurioCT
New Cone
New Cone
Posts: 4
Joined: 07 Jan 2021 14:51

Re: Possible bug in FTPS handling of # character

Postby CurioCT » 10 Jan 2021 02:44

Well the hash sign is a URL separator. In an FTPS URL, if you want the hash sign as a hash sign character rather than as a separator, you need to encode it. There's a bug, yes, but it seems to be in whichever software generated the playlist file.
That would be vlc ;)

Rémi Denis-Courmont
Developer
Developer
Posts: 15312
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Possible bug in FTPS handling of # character

Postby Rémi Denis-Courmont » 10 Jan 2021 12:00

Then file a bug.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: Bing [Bot] and 62 guests