My test results *do* disagree with yours, in that this does not look like something we've broken recently. It goes back at least nine months, and my intuition says that the inflection point is going to be a MacOS version and not a discrete Flash Player change. |
First of all, thanks for the answer. You are probably right about the issue going back, but I do seem to remember that I was able to trigger my code that would display an Alert if an illegal charachter was detected in the file name (doing a regex search on fileReference.name) back in November 2017. This code isn't triggered now because the illegal windows chars are stripped away before fileReference.name is filled with data.
Anyway, is there a workaround to this? All I want is to do is prevent the users on MacOS/Linux from uploading files with chars that are unsupported in file names on Windows NTFS (/ ? < > \ : * | ").
[correction] Yeah, you're right. We upload the file as originally named. It broke the directory listings on our IIS test server. I totally forgot. 
Do you require an extension on the filename? Since you know that the string will be truncated in this instance, you're pretty much guaranteed to not have a valid extension on the file. You could do a secondary check to ensure that the filename has an extension. If it doesn't, you know that it's either failing the invalid character test, or it doesn't meet your naming requirements. It's not the cleanest workaround, but it would probably solve the majority of these cases for you. You can actually just check that FileReference.type is null in this instance. Mac just gives you the extension back as a string.
Honestly, you should probably validate the filename at the receiving script as well as the client. It's not ideal, but you could reject the upload and return an error in the event that this sneaks through the client-side logic.
I'd like to see us fix this, but realistically, it's going to be a couple months before it would land in a generally-available release. If you have access to the server-side code, it might be worth just doing it as a stop-gap.