[Bug] App passwords that start with "+" or "-0" are changed in the .env file
I maintainer di solito rispondono entro 1 giorno
@wanghe-fit2cloud ci sta già lavorando.
Dal 26/10/2026.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 30/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Go
- Stelle
- 37.3k
- Fork
- 3.4k
- Merge medio
- 10h 3m
- PR unite (30g)
- 97
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di 1Panel-dev/1Panel
-
[Feature] The account pool of the AI gateway allows configuring a default prefix for accounts.Forse già presa @wanghe-fit2cloud l’ha presa oggi. Apertatype: ai-gateway
1Panel-dev/1Panel#14230 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Feature] 优化子节点升级流程Forse già presa @wanghe-fit2cloud l’ha presa oggi. Aperta
1Panel-dev/1Panel#14227 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
1Panel-dev/1Panel#14226 ·
I maintainer di solito rispondono entro 1 giorno
-
[Feature] Remember the previously selected time range for AI gateway usage statistics when the webpage is refreshed.Forse già presa @wanghe-fit2cloud l’ha presa 1 giorno fa. Apertatype: ai-gateway
1Panel-dev/1Panel#14223 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Feature] Only providers that have already been configured in the account pool appear in the usage statistics and call logs.Forse già presa @wanghe-fit2cloud l’ha presa 1 giorno fa. Apertatype: ai-gateway
1Panel-dev/1Panel#14220 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di 1Panel-dev/1Panel
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
yetone/magpie#4095 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
docs: Google Safe Browsing flags go-bonnie.dev as "deceptive" (pipe-to-shell install instructions)Apertadocumentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 2 giorni
-
[Bug]: Telegram bot (v3.11.0): "Ban log" no longer sends the current 3xipl-banned.logForse già presa @HamedSanaei l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
MHSanaei/3x-ui#6990 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
bug(tool/internal/instrument): identical inject_code rules from two rule packages are applied twiceAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
open-telemetry/opentelemetry-go-compile-instrumentation#1611 ·
I maintainer di solito rispondono entro 2 giorni