builder.AddConnectionString stores single quotes as Unicode escape sequences in user secrets, causing password recognition failure.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Describe the bug
When using Aspire Dashboard and leaving builder.AddConnectionString without a value, the dashboard prompts for parameter values as described here.
If the entered value contains single quotes ('), it is stored in ~/.microsoft/usersecrets/{UserSecretsId}/secrets.json as \u0027.
This Unicode conversion breaks password recognition because the original single quote is not preserved.
Additionally, the documentation should clarify that values entered through the dashboard prompt are saved to user secrets, as this behavior is not explicitly mentioned.
### Expected Behavior
- Single quotes should not be converted to Unicode escape sequences (\u0027) when saving to secrets.json.
- The original character should remain intact to ensure credentials work as intended.
- Documentation should explicitly state that dashboard-entered values are stored in user secrets.
### Steps To Reproduce
1. In Aspire Dashboard, leave builder.AddConnectionString without a value.
2. When prompted for unresolved parameters, enter a value containing single quotes (e.g., password'123).
3. Check ~/.microsoft/usersecrets/{UserSecretsId}/secrets.json.
4. Observe that the single quote is stored as \u0027, causing authentication issues.
### Exceptions (if any)
_No response_
### .NET Version info
~ ❯ dotnet --info 09:36:18
.NET SDK:
Version: 10.0.100
Commit: b0f34d51fc
Workload version: 10.0.100-manifests.4c0ca8ba
MSBuild version: 18.0.2+b0f34d51f
런타임 환경:
OS Name: Mac OS X
OS Version: 15.6
OS Platform: Darwin
RID: osx-arm64
Base Path: /usr/local/share/dotnet/sdk/10.0.100/
설치된 .NET 워크로드:
표시할 설치된 워크로드가 없습니다.
새 매니페스트를 설치할 때 use workload sets 사용하도록 구성됩니다.
워크로드 집합이 설치되어 있지 않습니다. "dotnet workload restore"를 실행하여 워크로드 집합을 설치하세요.
Host:
Version: 10.0.0
Architecture: arm64
Commit: b0f34d51fc
.NET SDKs installed:
9.0.305 [/usr/local/share/dotnet/sdk]
10.0.100 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 9.0.9 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 9.0.9 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
DOTNET_ROOT [/opt/homebrew/opt/dotnet/libexec]
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.