swiftp icon indicating copy to clipboard operation
swiftp copied to clipboard

Allow non alphanumeric ASCII characters in username

Open Wallby opened this issue 2 years ago • 1 comments

Currently only alphanumeric characters are allowed but ftp supports all ASCII characters "except <CR> and <LF>" according to https://stackoverflow.com/questions/3466831/non-latin-characters-in-username-for-ftp

Wallby avatar Apr 28 '23 18:04 Wallby

I'm not doing anything with this atm except for quickly looking into it.

The issue may be completely with these two code uses:

https://github.com/ppareit/swiftp/blob/b6dd62b9c2dd5d7b28cc73c35d739c1fb91d98b9/app/src/main/java/be/ppareit/swiftp/gui/UserEditFragment.java#L102

https://github.com/ppareit/swiftp/blob/b6dd62b9c2dd5d7b28cc73c35d739c1fb91d98b9/app/src/main/java/be/ppareit/swiftp/server/CmdUSER.java#L39

I suppose the way that would be used/accepted here would be to change the regex of matches to include ASCII chars. But, this way assumes nothing else is to be added, or to simply keep adding if that's a thing, or to try to find and add all possibilities if there are more and maybe it will no longer need any changes.

From what I can see, these two are the only two points that need changes for this (but I could have missed something).

Xavron avatar Aug 25 '24 12:08 Xavron