DependencyTrack / DependencyTrack/dependency-track

licenseUrl not saved

Open
#3,334 0 comments 0 reactions 0 assignees View on GitHub
defect p2
Dominant language
Java
Stars
4.2k
Forks
811
Avg merge
8h 39m
Merged PRs (30d)
237

Description

### Current Behavior

# Observation
In the UI I try to edit a component (in this case "Microsoft.Bcl.Build") and wanted to update the license url to "https://dotnet.microsoft.com/en-us/dotnet_library_license.htm"

This seemed to work, I got reported success (see screenshots below). But the license url is gone now. Not even the original url (before I tried to update it) is gone. This happend to a view components, before I noticed it - I can't tell which ones any more.

# Chrome dev tool POST request/response

## Post Request
{"uuid":"c09c381a-a631-4a81-abbd-1a6e82b04e75","name":"Microsoft.Bcl.Build","version":"1.0.21","author":"Microsoft","description":"Provides build infrastructure components for Microsoft packages.","license":null,"licenseUrl":"https://dotnet.microsoft.com/en-us/dotnet_library_license.htm","classifier":"LIBRARY","purl":"pkg:nuget/Microsoft.Bcl.Build@1.0.21","copyright":"Copyright © Microsoft Corporation","sha512":"39628a7a7953f2d42c462e3f534af4e70f4b3c68bcd8b5b90f097003ef3533854fff00f6fb54c8a1ad8d00c71a21a8fc45a65b84d8dc840f90be0c199e75f1ce"}

## POST response is missing the licenseUrl (removed project node content )

{
"author": "Microsoft",
"name": "Microsoft.Bcl.Build",
"version": "1.0.21",
"classifier": "LIBRARY",
"sha512": "39628a7a7953f2d42c462e3f534af4e70f4b3c68bcd8b5b90f097003ef3533854fff00f6fb54c8a1ad8d00c71a21a8fc45a65b84d8dc840f90be0c199e75f1ce",
"purl": "pkg:nuget/Microsoft.Bcl.Build@1.0.21",
"purlCoordinates": "pkg:nuget/Microsoft.Bcl.Build@1.0.21",
"description": "Provides build infrastructure components for Microsoft packages.",
"copyright": "Copyright © Microsoft Corporation",
"externalReferences": [
{
"type": "website",
"url": "http://go.microsoft.com/fwlink/?LinkID=296436"
}
],
"project": {
},
"lastInheritedRiskScore": 0.0,
"uuid": "c09c381a-a631-4a81-abbd-1a6e82b04e75",
"usedBy": 0,
"expandDependencyGraph": false,
"isInternal": false
}

### Steps to Reproduce

1. Navigate to
![image](https://github.com/DependencyTrack/dependency-track/assets/116338814/9bbd8ae2-0e60-45f1-b48c-5202b51a3c21)

2. Change licenseURl and click on save, await success

![image](https://github.com/DependencyTrack/dependency-track/assets/116338814/632cad57-023d-4177-bbcb-cd71100e6423)

3. Navigate again to the legal tab, now licenseUrl is empty

![image](https://github.com/DependencyTrack/dependency-track/assets/116338814/019b6689-57e1-4cfa-81c8-3bdab1fa6324)

### Expected Behavior

url shows the last saved url

### Dependency-Track Version

4.10.0

### Dependency-Track Distribution

Container Image

### Database Server

PostgreSQL

### Database Server Version

_No response_

### Browser

Google Chrome

### Checklist

- [X] I have read and understand the [contributing guidelines](https://github.com/DependencyTrack/dependency-track/blob/master/CONTRIBUTING.md#filing-issues)
- [X] I have checked the [existing issues](https://github.com/DependencyTrack/dependency-track/issues) for whether this defect was already reported

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.