[Bug] App passwords that start with "+" or "-0" are changed in the .env file
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Go
- スター
- 37.3k
- フォーク
- 3.4k
- 平均マージ
- 10時間 31分
- マージ済み PR(30日)
- 80
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
1Panel-dev/1Panel のほかの issue
-
Consider switching the panel terminal to PTY (pseudo-terminal) so that the panel terminal can still be used when the SSH service is disabled!対応中かも @wanghe-fit2cloud が 1 日前に担当しました。 オープンtype: feature-request
1Panel-dev/1Panel#14178 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[Feature] Why can’t the Referer field in the header be left empty when configuring custom WAF rules?対応中かも @wanghe-fit2cloud が 2 日前に担当しました。 オープンtype: feature-request
1Panel-dev/1Panel#14176 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[Feature] Can CAS be integrated into 1Panel’s authentication system?対応中かも @wanghe-fit2cloud が 2 日前に担当しました。 オープンtype: feature-request
1Panel-dev/1Panel#14174 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] MySQL backup fails with “illegal characters” when the password contains special characters対応中かも @wanghe-fit2cloud が 2 日前に担当しました。 オープンtype: optimization
1Panel-dev/1Panel#14172 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[Feature] Keep WAF supplemental rules updated and add CVE-2026-109618 / CVE-2026-109619対応中かも @wanghe-fit2cloud が 2 日前に担当しました。 オープンtype: feature-request
1Panel-dev/1Panel#14171 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
1Panel-dev/1Panel の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
blinklabs-io/dingo#5636 ·
メンテナーはふだん 1 日以内に返信
-
automated-analysis bug cookie safe-outputs tool-improvement workflow-issue
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
github/gh-aw#71952 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
JetBrains/youtrack-cli#130 ·
メンテナーはふだん 1 日以内に返信
-
Cloudflare Pages secret sync throws TypeError when deployment_configs[environment] is undefinedオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Infisical/infisical#8892 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
windvane requests one more page than it needs対応中かも @TassioSales が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
projectdiscovery/subfinder#1979 ·
メンテナーはふだん 3 日以内に返信