fix(firestore-send-email): kit/extension parity – a required placeholder SMTP_PASSWORD overrides the password in SMTP_CONNECTION_URI

Abierto
#3,293 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 7 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
56/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
firebase, typescript

Línea de trabajo

Start with kits/firestore-send-email/src/helpers.ts around lines 93–99 and compare its SMTP password handling with the extension helper at functions/src/helpers.ts around lines 61–68. Read the kit README section around lines 157–169 and inspect the migration and secret binding references in the issue. Done means a kit migrated from a URI with an inline password can send successfully, with the intended behavior documented or covered.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

kits parity type: bug

firestore-send-email kit/extension parity. Priority: high. After migrating, every email fails to send if the SMTP password was kept in the connection URI.

Difference
  • Extension: SMTP_PASSWORD is optional. Installs that put the password in SMTP_CONNECTION_URI (the "backwards compatible" form in the param's description) have no secret, and the URI's password is used.
  • Kit:
    • All four secrets are always bound, so SMTP_PASSWORD must exist and must not be empty. ext:migrate and functions:kits:install prompt for it, and Secret Manager rejects an empty value.
    • Any non-blank value then replaces the URI's password, the same as in the extension.
    • Users who enter a placeholder (the README recommends placeholders for the unused secrets) get an authentication failure on every send. A placeholder also adds auth to SMTP relays that need none.
Reproduced
  1. Extension installed with SMTP_CONNECTION_URI=smtp://user:[email protected]:587 and no SMTP_PASSWORD: mail sends (SUCCESS).
  2. firebase ext:migrate on that instance: it prompts "Enter a value for SMTP password". An empty answer fails with Secret Payload cannot be empty, so "placeholder" was entered.
  3. The migrated kit fails every document with delivery.error: "Error: Invalid login: 535 Authentication failed". A README-setup kit with the same URI and a placeholder secret fails the same way.
  4. Setting the secret to a single space works around it: the kit trims it to unset, and mail sends.
Code
Resolution
  • Only use SMTP_PASSWORD when the URI carries no password of its own. That is a behaviour change only for configs that set both.
  • Or, at a minimum, document in the README and the migration notes: move an inline password into SMTP_PASSWORD, or set that secret to a single space.
Lenguaje dominante
TypeScript
Estrellas
979
Forks
436
Merge medio
4 d 12 h
PR fusionados (30 d)
13

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de firebase/extensions

Todos los issues de firebase/extensions

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.