Repository navigation
fix(config): 修复 PostgreSQL 凭证编码与配置重载 - #1364
Open
MakerFlyFly wants to merge 2 commits into
Open
MakerFlyFly wants to merge 2 commits into
MakerFlyFly wants to merge 2 commits into
Conversation
Collaborator
|
分诊:问题真实( 请 rebase 到最新 develop,解决 CHANGELOG 冲突(接到当前 Unreleased「### 修复」),再跑 CI。已错误写入 |
MakerFlyFly
force-pushed
the
codex/h09-postgres-credentials
branch
from
September 30, 2026 08:15
ac86774 to
384b092
Compare
MakerFlyFly
force-pushed
the
codex/h09-postgres-credentials
branch
from
October 3, 2026 15:48
384b092 to
3a62dac
Compare
MakerFlyFly
force-pushed
the
codex/h09-postgres-credentials
branch
from
October 8, 2026 02:47
3a62dac to
eba2486
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
关联 Issue:#1362
PostgreSQL 控制面使用包含空格的凭证时无法认证;输入正确编码的 URL 后,向导保存配置又可能把用户名和密码重复编码,导致立即绑定和后续启动失败。
此修改将生成 URI 的凭证编码改为
quote(value, safe=""),并在解析输入 URL 时使用unquote()解码用户名和密码一次。例如,my pass正确编码为my%20pass;Audit%40123保存为原始密码Audit@123,重载后不会变成Audit%2540123。生产代码仅修改
src/octop/config.py的 5 行。原始 URL、查询参数、配置优先级、公共接口和依赖保持现状;补充凭证解析和保存重载回归测试,并在现有Unreleased → 修复段追加一条变更记录。工作区存储 DSN(PR #1010)不在本次修改范围。已被旧逻辑错误保存的离散凭证仍需重新填写原始值;本次不尝试自动解码已有字段,以保留字面量
%40等合法凭证。目标分支
develop(普通修复)main(发布或紧急修复)重基后的基线:
11f6d3fb228d2fbcd6446f04c5b8d8b68b4c162e。保持一个原子提交。变更类型
缺陷修复
新功能
不兼容变更
验证
11f6d3fb228d2fbcd6446f04c5b8d8b68b4c162e完成 rebase;CHANGELOG 条目接入当前 Unreleased 的「### 修复」,保留全部上游发布记录。uv sync --locked与npm ci通过,依赖声明与锁文件采用上游最新内容。make all PYTEST_JOBS=4:4245 passed, 145 skipped, 18 warnings in 508.99s (0:08:28);Ruff 与 mypy 通过。.githooks/pre-commit:4246 passed, 179 skipped, 18 warnings in 797.43s (0:13:17);TypeScript 与 dashboard Vite/PWA 构建通过。本轮检查在 Windows / Python 3.12.13 下运行,采用 UTF-8,并将测试临时目录隔离到审计目录。
GitHub Actions 状态以本次提交的工作流为准;本地验证结果不代表远端 CI 已通过。
保留既有实测证据:Windows PostgreSQL 16.15 / SCRAM 的 15 组凭证矩阵(90 次真实连接)及 5 组配置向导/新进程重启检查通过。本轮未重复该原生数据库实测。
检查清单
添加或更新回归测试
更新
CHANGELOG.md,保留上游所有条目修复不涉及数据库迁移、API 或依赖变更
重基后的
make all本地通过重基后的提交 hook 和前端构建通过