Closed Bug 1865321 Opened 2 years ago Closed 2 years ago

PKPass file has incorrect name and extension when downloaded

Categories

(Firefox for Android :: Downloads, defect, P3)

Firefox 120
All
Android
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: eternal.linux, Unassigned)

Details

(Whiteboard: [qa-triaged])

Attachments

(2 files)

Attached file pkpass-request.har

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.)

Attached file about-support.txt

Attaching the text from about:support.

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.

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

Severity: -- → S3
Priority: -- → P3

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!

Flags: needinfo?(eternal.linux)
Whiteboard: [qa-triaged]

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!

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Flags: needinfo?(eternal.linux)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: