fix(desktop): authenticate gated file downloads like REST (supersedes #89013) - #90546
Merged
Conversation
Downloads have to present the same bearer-vs-cookie choice as oauth REST. A cookie-only save against a cookieless native session is the Files-panel 401. Co-authored-by: 686f6c61 <github@00b.tech>
saveGatewayFile rode the OAuth cookie partition even when hermes:api already held a native bearer, so listing worked and Download 401'd. Co-authored-by: 686f6c61 <github@00b.tech>
19 tasks
Contributor
૮ >ﻌ< ა ci reviewrunning on 0f18087 — fix(desktop): authenticate gated file downloads like REST Still running 1 job:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Supersedes #89013. Files panel listing on a gated remote uses
hermes:api(native bearer, then OAuth-partition cookies). Download usedsaveGatewayFile, which always rode the OAuth cookie partition. A cookieless native / native-password session can list files and still 401 on Download.This makes save/read use the same bearer-then-cookie choice as REST. It drops the default-session cookie-jar walk from #89013: Desktop password login already posts into
persist:hermes-remote-oauth.Related Issue
Fixes #88987
Type of Change
Changes Made
resolveGatedDownloadAuthreusesresolveOauthRestAuthfor oauth modesaveGatewayFileand the data-URL fallback present that auth (native bearer streams withAuthorization)How to Test
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/ACredit: @686f6c61 (primary). Related: #89013, #89257.