PassAndroid icon indicating copy to clipboard operation
PassAndroid copied to clipboard

Can't open Lufthansa URL directly and update it

Open jonas-w opened this issue 2 years ago • 2 comments

I needed to download the pkpass file first with my browser, to be able to open the file. Opening the URL directly with PassAndroid didn't work, it just said that the file is not a pkpass file. The same happens when pressing the refresh button, after I've manually imported it.

I tried it with curl and got a 403 response back from akamai, but spoofing the user agent to my firefox on android user agent returned the pkpass file to curl.

Seemingly some user agents like curl are blocked, would it be possible to spoof the user agent in the app?

jonas-w avatar Oct 28 '23 23:10 jonas-w

Thanks for the detailed report. Yes we can set a user-agent in okhttp. What is the URL it should be changed for? Also could you test the fix as I could not test the impact of a change.

ligi avatar Oct 29 '23 16:10 ligi

Thank you, the link is https://once.lufthansa.com/download/Checkin/Documents/pkpass/{UUID4}.pkpass

Obviously, {UUID4} is an uuid4 (e.g. 6ab69812-c140-42f7-af91-92e4ff3223ec), but the real one omitted for privacy.

Though I don't know if there are more URLs, as this one contains "Checkin", which makes sense as I received the link after check in.

jonas-w avatar Oct 29 '23 16:10 jonas-w