Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrupted PNG with authorized download #825

Open
ghost opened this issue May 25, 2022 · 1 comment
Open

Corrupted PNG with authorized download #825

ghost opened this issue May 25, 2022 · 1 comment
Labels
bug/fix Quaternion doesn't work as expected

Comments

@ghost
Copy link

ghost commented May 25, 2022

Description

Downloading files with a retried auth seems to yield corrupted files sometimes.
Image of the inspected header attached.
screenshot273

I suspect what is happening is that Quaternion tries to load the first image, saves the error code to the file despite the unauthorized http error and then on the second auth run assumes the file is a partial download. I have not checked the code to confirm this so I could be wrong easily.

On second images then quaternion already knows the repo requires auth so this doesn't happen again.
Log:

quotient.jobs: 401 <- GET https://nheko-im.neko.dev/_matrix/media/r0/download/tchncs.de/04fedbd08af4eacafe63beeb94b4369b352cc801
quotient.jobs: "DownloadFileJob" status Unauthorised: Host requires authentication
quotient.jobs: "DownloadFileJob" re-running with authentication
[...]
quotient.jobs: 200 <- GET https://nheko-im.neko.dev/_matrix/media/r0/download/tchncs.de/04fedbd08af4eacafe63beeb94b4369b352cc801
qrc:/qml/ImageContent.qml:10:5: QML Image: Error decoding: file:///boot/system/cache/tmp/04fedbd08af4eacafe63beeb94b4369b352cc801_6f61ca6b9z091.png: Unsupported image format

Steps to reproduce

Use a server with auth, seems to happen with some media only
edit: probably only the first media download of the session is affected by this

Version information

Haiku hrev56122+7
Quaternion v0.0.95.1
Qt 5.15.2-8
QtHaikuPlugins 5.15.2.21-1

@ghost ghost added the bug/fix Quaternion doesn't work as expected label May 25, 2022
@KitsuneRal
Copy link
Member

Does it still happen or not any more? There were quite a few changes around the relevant code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/fix Quaternion doesn't work as expected
Projects
None yet
Development

No branches or pull requests

1 participant