[Bug] App passwords that start with "+" or "-0" are changed in the .env file
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 30/100
Línea de trabajo
The bug is in agent/utils/env/env.go where Marshal and MarshalWithOrder write values with %d after strconv.Atoi parses them. Read those functions and change the logic so strings with a leading '+' or '-0' are emitted quoted. Done means the app .env shows PANEL_DB_ROOT_PASSWORD='+123456' unaltered.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
1Panel Version
Current dev-v2 (commit c4b76a8).
Problem Description
When you install an app or edit its parameters, 1Panel rewrites values that look like signed integers in the app's .env file. For example, the password +123456 is written as PANEL_DB_ROOT_PASSWORD=123456, and -0123 is written as -123. 1Panel still stores and shows the original value, but the container starts with the changed one, so you cannot log in with the password you entered.
This is the same problem as #4949, where values with a leading 0 lost their zeros. That case is fixed, but values with a leading + or with -0 still change.
Steps to Reproduce
- Install MySQL (or another app with a password parameter) from the app store.
- Set the root password to
+123456. - Open the app's
.envfile under/opt/1panel/apps/mysql/<name>/.env.
The expected correct result
PANEL_DB_ROOT_PASSWORD='+123456'
Related log output
PANEL_DB_ROOT_PASSWORD=123456
Additional Information
The cause is in agent/utils/env/env.go. Marshal and MarshalWithOrder write a value unquoted with %d whenever strconv.Atoi parses it, and Atoi accepts +123456 and -0123.
- Lenguaje dominante
- Go
- Estrellas
- 37.3k
- Forks
- 3.4k
- Merge medio
- 10 h 31 min
- PR fusionados (30 d)
- 80
Preparar el entorno
- Sin Dockerfile ni 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 1Panel-dev/1Panel
-
Consider switching the panel terminal to PTY (pseudo-terminal) so that the panel terminal can still be used when the SSH service is disabled!Posiblemente ocupada @wanghe-fit2cloud la tomó hace 1 día. Abiertotype: feature-request
1Panel-dev/1Panel#14178 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[Feature] Why can’t the Referer field in the header be left empty when configuring custom WAF rules?Posiblemente ocupada @wanghe-fit2cloud la tomó hace 2 días. Abiertotype: feature-request
1Panel-dev/1Panel#14176 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[Feature] Can CAS be integrated into 1Panel’s authentication system?Posiblemente ocupada @wanghe-fit2cloud la tomó hace 2 días. Abiertotype: feature-request
1Panel-dev/1Panel#14174 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[Bug] MySQL backup fails with “illegal characters” when the password contains special charactersPosiblemente ocupada @wanghe-fit2cloud la tomó hace 2 días. Abiertotype: optimization
1Panel-dev/1Panel#14172 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[Feature] Keep WAF supplemental rules updated and add CVE-2026-109618 / CVE-2026-109619Posiblemente ocupada @wanghe-fit2cloud la tomó hace 2 días. Abiertotype: feature-request
1Panel-dev/1Panel#14171 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de 1Panel-dev/1Panel
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
bug good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
SimonWaldherr/golang-examples#109 ·
-
Missing strings in en.tsAbiertoarea: localization needs-triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
bug ready-for-pr
Dificultad 2/5 1-3 horas Aptitud para principiantes 71/100
kunchenguid/no-mistakes#1615 · 1 comentario ·
Los mantenedores suelen responder en 1 día