Skip to content

Commit

Permalink
Prevent liscenseURL greater than length 255 on stream
Browse files Browse the repository at this point in the history
  • Loading branch information
tiger5226 committed Aug 11, 2020
1 parent 1b1ced9 commit e01ddc7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion daemon/processing/claim.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,13 @@ func setStreamMetadata(claim *model.Claim, stream pb.Stream) {
license = license[:500]
}
claim.License.SetValid(license)
claim.LicenseURL.SetValid(stream.GetLicenseUrl())

liscenseURL := stream.GetLicenseUrl()
if len(liscenseURL) > 255 {
liscenseURL = liscenseURL[0:255]
}
claim.LicenseURL.SetValid(liscenseURL)

claim.Preview.SetValid("") //Never set

fee := stream.GetFee()
Expand Down

0 comments on commit e01ddc7

Please sign in to comment.