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
If a URL is passed to Waffle (e.g. through cast_attachments), and the URL has no path (e.g. https://google.com), Waffle causes an exception, because it passes the path of the parsed URI to Path.basename/1 without checking for nil or / first.
@woylie would this issue also cover URLs with a non-traditional "filename" such as https://google.com/test/.jpg ? I have encountered a service that provides URLs in this form, and I suspect that I will need to refactor some of the filename handling code in waffle to deal with that case.
@woylie would this issue also cover URLs with a non-traditional "filename" such as https://google.com/test/.jpg ? I have encountered a service that provides URLs in this form, and I suspect that I will need to refactor some of the filename handling code in waffle to deal with that case.
I linked the relevant code. If you run it with a URL in that format, you get:
If a URL is passed to Waffle (e.g. through
cast_attachments
), and the URL has no path (e.g.https://google.com
), Waffle causes an exception, because it passes the path of the parsed URI toPath.basename/1
without checking fornil
or/
first.waffle/lib/waffle/file.ex
Line 18 in 6a38e9a
Waffle should handle this case gracefully.
The text was updated successfully, but these errors were encountered: