[Bug] ChatGPT file downloads fail with HTTP 403 when intercepted by Gopeed (Authorization header not forwarded?)

Aperta
#117 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
56/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
networking

Direzione di ricerca

Start by reading the request header listener changed in PR #104 and trace how intercepted downloads are handed to Gopeed. Check whether Fetch requests categorized as xmlhttprequest preserve the Authorization header, using a ChatGPT download request to reproduce the reported 403. Done means the authenticated download succeeds and the original filename is retained; the report does not name test files.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Environment

  • Gopeed: 2.0.0-beta4
  • Gopeed Browser Extension: 1.1.5
  • OS: macOS
  • Browser: Microsoft Edge (Chromium)
  • Website: https://chatgpt.com/
  • Download endpoint: https://chatgpt.com/backend-api/estuary/content (query parameters redacted)

Bug Description

Downloading files generated by ChatGPT fails when the download is intercepted by the Gopeed browser extension.

Gopeed creates the download task, but the task fails with HTTP 403 and downloads 0 bytes.

The same file can be downloaded successfully using the browser's native download functionality when Gopeed interception is bypassed.

Steps to Reproduce

  1. Open ChatGPT in Microsoft Edge and sign in.
  2. Generate a file (e.g., a Markdown .md file).
  3. Enable download interception in Gopeed Browser Extension 1.1.5.
  4. Click the generated file's download button.
  5. Observe that Gopeed creates a download task.
  6. The task fails with Exception: http request fail, code:403.
  7. Bypass Gopeed interception for chatgpt.com and retry the download using Edge's native downloader.
  8. The file downloads successfully.

Actual Behavior

  • HTTP 403 Forbidden.
  • Downloaded size: 0 B.
  • Gopeed identifies the filename as content instead of the original .md filename.
  • Failed URL path: /backend-api/estuary/content.

Expected Behavior

Gopeed should successfully download files that are accessible through the browser's authenticated session, preserving any required authentication headers when transferring the download request.

Investigation

I inspected the successful download request using Edge DevTools (Network tab).

The request:

  • Uses the Fetch API (shown as fetch in DevTools).
  • Contains an Authorization: Bearer ... request header.
  • Succeeds when handled by the browser directly.

When Gopeed intercepts the download, the resulting Gopeed task returns HTTP 403.

Opening the download URL manually in Gopeed also results in HTTP 403, although that test does not preserve the browser's authentication headers.

Possible Cause

This may be related to how the browser extension captures and forwards authenticated requests.

In PR #104:

https://github.com/GopeedLab/browser-extension/pull/104

The request header listener appears to filter the following request types:

types: ["main_frame", "sub_frame"]

Chrome categorizes Fetch/XHR requests as xmlhttprequest in the webRequest API.

Could this prevent the extension from capturing authentication headers associated with ChatGPT's Fetch-based downloads?

This is a hypothesis rather than a confirmed root cause. It would be helpful to verify whether the intercepted download request contains all required authentication headers when handed over to Gopeed.

Workaround

Adding chatgpt.com to the extension's domain exclusion list allows the browser's native downloader to handle ChatGPT files successfully.

Security Note

Authentication tokens, cookies, and signed URL query parameters have been deliberately omitted from this report.

Lingua principale
TypeScript
Stelle
382
Fork
27
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di GopeedLab/browser-extension

Tutte le issue di GopeedLab/browser-extension

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.