Skip to content

Parameters in User Secrets containing & are converted to contain \u0026 insteadΒ #5537

@fdohrendorfG

Description

@fdohrendorfG

Sometime Parameters in the User Secrets secret are being modified to contain \u0026 instead of &.

So this

{
    "Parameters:token": "some=thing&looking=url&like=true"
}

is turned into this

{
    "Parameters:token": "some=thing\u0026looking=url\u0026like=true"
}

Being used like this:

var builder = DistributedApplication.CreateBuilder(args);
var token = builder.AddParameter("token", secret: true);
var sqlServer = builder.AddSqlServer("sql")
    .WithEnvironment("TOKEN", token);
builder.Build().Run();

I haven't found the exact cause when this happens.

I just noticed, that I also have a password that suddenly did not work anymore: P\u002BqMWNzkn*xm1rhXNF5st0.
So also happening for \u002B or + character.

VS: Version 17.12.0 Preview 1.0
Aspire 8.2.0 (Could also have been the previous version, as it is hard to determine when it happend)

Metadata

Metadata

Assignees

Labels

area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions