Skip to content
This repository was archived by the owner on Jul 21, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/ADOGenerator/Services/ProjectService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2870,6 +2870,7 @@ public static string SanitizeJson(string json)
{
jsonObject["password"] = "****";
}
// Add more sanitization logic as needed
return jsonObject.ToString();
}
}
3 changes: 2 additions & 1 deletion src/API/Service/ServiceEndPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public ServiceEndpointModel CreateServiceEndPoint(string json, string project)

using (var client = GetHttpClient())
{
var jsonContent = new StringContent(json, Encoding.UTF8, "application/json");
var sanitizedJson = Utility.SanitizeJson(json);
var jsonContent = new StringContent(sanitizedJson, Encoding.UTF8, "application/json");
var method = new HttpMethod("POST");

var request = new HttpRequestMessage(method, project + "/_apis/distributedtask/serviceendpoints?api-version=" + _configuration.VersionNumber) { Content = jsonContent };
Expand Down
Loading