The access_token cookie is set without the `secure` flag outside NODE_ENV=production, including on HTTPS staging deploys

Aperta
#614 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@urielit1313-creator ci sta già lavorando.

Dal 13/10/2026.

  • #625 di @urielit1313-creator — aperta
  • #648 di @yggdrasilworld — chiusa senza merge
  • #690 di @PINYOPATTANAWASANPORN — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
20/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
typescript

Direzione di ricerca

The cookie is set in githubCallback, where secure is tied to isProd, which is env === 'production'. Three open pull requests (#625, #648, #690) already target this, and #131 is related, so read those first and check whether any of them is still open for review before starting. Done means the access_token cookie gets secure whenever the request is served over HTTPS, based on req.secure with trust proxy or on APP_URL, and this is verified against a staging-style config.

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

Descrizione

good first issue security

Problem

githubCallback sets secure: isProd, where isProd is env === 'production'. Staging or preview environments served over HTTPS but with NODE_ENV=staging/development issue the session cookie without Secure, so it can be sent over plain HTTP if any http:// URL on the domain is hit.

Suggested fix

Base secure on the request protocol (req.secure with trust proxy) or APP_URL starting with https.

Related: #131

Lingua principale
TypeScript
Stelle
2
Fork
90
Merge medio
31m
PR unite (30g)
20

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

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 MergeFi/backend

Tutte le issue di MergeFi/backend

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.