PKPass file has incorrect name and extension when downloaded
Categories
(Firefox for Android :: Downloads, defect, P3)
Tracking
()
People
(Reporter: eternal.linux, Unassigned)
Details
(Whiteboard: [qa-triaged])
Attachments
(2 files)
Steps to reproduce:
I've bought some railway tickets through Great Northern Rail, and got a link to download the e-tickets in an email 0. I can reproduce the issue by touching on the link in my Gmail app on Android, or pasting it into the URL bar in Firefox for Android Beta.
Actual results:
I can download the file, but it's named b55c7333c32c9f4fd729080b282a7e3f52423a24d42e90d1a0ac595f99919589.bin, so when I try to open it in my PKPass-supporting Android app, the app doesn't recognize it as a valid PKPass. If I find the file in the Files app and rename it to end with .pkpass, everything works.
Expected results:
The downloaded file should be named "MKC-EUS-20231118-TREPBYP22E8.pkpass", since the response from the server (acquired using USB debugging) includes the header "content-disposition: filename=MKC-EUS-20231118-TREPBYP22E8.pkpass". (I've attached a HAR file of the relevant request.)
(For comparison, if I go to the same URL in Chrome for Android, it downloads the file with the correct name. The SHA512 hashes of the files downloaded by Chrome and by Firefox are the same, it's just the name that's different.)
| Reporter | ||
Comment 1•2 years ago
|
||
Attaching the text from about:support.
| Reporter | ||
Comment 2•2 years ago
|
||
This bug looks similar to https://bugzilla.mozilla.org/show_bug.cgi?id=1812785, but I wasn't quite sure, so thought I'd file a separate one in case.
Comment 3•2 years ago
|
||
Unfortunately, the site set wrong Content-Disposition header, it miss attachment; before filename......
Correct: content-disposition: attachment; filename=MKC-EUS-20231118-TREPBYP22E8.pkpass
Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition
Ref: https://httpwg.org/specs/rfc6266.html#header.field.definition
Updated•2 years ago
|
Comment 4•2 years ago
|
||
Hi, Harry Cutts, have you been able to reproduce this issue under different circumstances or with other files? If so, could you please provide such a file to help reproduce the issue? Thank you!
Updated•2 years ago
|
| Reporter | ||
Comment 5•2 years ago
|
||
Hi Delia,
I haven't been able to reproduce this elsewhere, and in fact I've noticed that when I download tickets from Great Northern Rail now (including through the link in the description), they're downloaded with the correct extension (.pkpass), and therefore open in the correct Android app. I'm not sure if that's a result of a change in Firefox or the Great Northern Rail website, but it seems I can't reproduce this at all anymore.
Thanks for looking into it!
Description
•