`masterKey` function is not called on server start
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- node.js, typescript
- Área
- backend
Línea de trabajo
Empieza en src/ParseServer.ts, en ParseServer.start(), y rastrea cómo las tareas de inicio acceden a las opciones devueltas por Config.put(). Reproduce el problema con una función masterKey que rechaza y, a continuación, verifica que el inicio la invoca y rechaza antes de atender solicitudes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
New Issue Checklist
- Report security issues confidentially.
- Any contribution is under this license.
- Before posting search existing issues.
Issue Description
If the Parse Server option masterKey is set to a function, the function is supposed to be called when Parse Server starts; ParseServer.start() in src/ParseServer.ts adds this.config.loadMasterKey?.() to the startup tasks. However, this.config is the plain options object returned by Config.put(), not a Config instance. It has no loadMasterKey method, so the optional call does nothing. This has been the case since setting masterKey to a function was added in #9582 (Parse Server 8.0.0).
As a result, the function is only called on the first request. If it fails, for example because a secret store is unavailable, Parse Server starts nonetheless and responds to every request with status 500, including the /health endpoint. Other startup tasks, such as the migration of the schema option or the connection of the cache adapter, make the start fail instead.
Steps to reproduce
- Start Parse Server with
masterKey: () => Promise.reject(new Error('secret store unavailable')), and awaitParseServer.start(). - Send any request, for example
GET /parse/health.
Actual Outcome
ParseServer.start() resolves; the masterKey function has not been called. The request fails with status 500 and {"code":1,"message":"Internal server error."}, and so does every following request.
Expected Outcome
The masterKey function is called when Parse Server starts, and ParseServer.start() rejects if the function fails.
Environment
Server
- Parse Server version:
9.10.2-alpha.4(alphabranch); since8.0.0 - Operating system: any
- Local or remote host: any
Database
- System: any
- Database version: any
- Local or remote host: any
Client
- SDK: any
- SDK version: any
Logs
Not applicable
- Lenguaje dominante
- JavaScript
- Estrellas
- 21.4k
- Forks
- 4.8k
- Merge medio
- 7 h 2 min
- PR fusionados (30 d)
- 70
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de parse-community/parse-server
-
Add MongoDB 9 supportPosiblemente ocupada @ga262 la tomó hace 10 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
parse-community/parse-server#10750 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
parse-community/parse-server#10720 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Node.js version in `.nvmrc` does not satisfy `engines.node`Posiblemente ocupada @kokokoXUY la tomó hace 18 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
parse-community/parse-server#10699 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
RedisCacheAdapter put, del and clear reject on a Redis outage, producing unhandled rejectionsPosiblemente ocupada @AdrianCurtin la tomó hace 62 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
parse-community/parse-server#10634 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Documentation for directAccess states the default is false, but it has defaulted to true since Parse Server 6Quizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
parse-community/parse-server#10631 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de parse-community/parse-server
Issues similares
-
internal os specific
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
frostney/GocciaScript#1688 ·
Los mantenedores suelen responder en 1 día
-
🐞 bug pending triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
CircuitVerse/CircuitVerse#8031 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 8 días
-
docs(stream-protocol): document messageMetatadata on start/finish and the message-metadata chunkPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertofactory-active task-identify-harness-labels-done task-identify-issue-type-done
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
vercel/ai#23375 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 7 días