You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simple Java Mail tries to use the extension found in the resource name over the provided name. This is to find possible missing or invalid extensions provided manually by looking at the resource itself.
However, this contains a bug where the given extension is overwritten even if the resource's extension is not really an extension at all, in some URL for example:
URL url = new URL("https://booking.skypicker.com/api/v0.1/get_file/1234?file_id=1234&simple_token=abcd1234");
URLDataSource resource = new URLDataSource(url);
Email email = EmailBuilder.startingBlank()
(..)
.withAttachment("invoice.pdf", resource)
.buildEmail();
Because of this bug, the invoice.pdf filename is replaced with invoice.pdf.1/get_file/1234?file_id=1234&simple_token=abcd1234.
The current solution is not as smart as realizing .1+rest is not an extension, but it should be smart enough to understand the given filename already has an extension.
The text was updated successfully, but these errors were encountered:
Simple Java Mail tries to use the extension found in the resource name over the provided name. This is to find possible missing or invalid extensions provided manually by looking at the resource itself.
However, this contains a bug where the given extension is overwritten even if the resource's extension is not really an extension at all, in some URL for example:
Because of this bug, the
invoice.pdf
filename is replaced withinvoice.pdf.1/get_file/1234?file_id=1234&simple_token=abcd1234
.The current solution is not as smart as realizing .1+rest is not an extension, but it should be smart enough to understand the given filename already has an extension.
The text was updated successfully, but these errors were encountered: