Problem to donwload a file over StreamResource if the filename contains square brackets on OIDC secured applications


we use an anchor and the functionality to set an AbstractStreamResource to provide downloads of database located files. This works fine so far. Now we secure the whole web application over OpenIDConnect and the download of file which contains square brackets in the file name is broken. The browser report that the website is not available.

What i can see is, that if we use mouse over on the anchor, the filename decoed by the browser already contains the square brackets. This is independent of whether we secure the application with OpenIDConnect or not.

If i dive into the Vaadin classes wich encode the filename i come to the function encodeURIComponent in UrlUtil. I didn’t understand exactly why, but this functions decode some characters after encoding of the complete URL (e.g. round brackets). It is possible that the square brackets should also decoded here?!