Skip to content

Commit

Permalink
validate real length of license string
Browse files Browse the repository at this point in the history
  • Loading branch information
btzr-io authored Jan 30, 2021
1 parent 229222d commit fb43c9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion daemon/processing/claim.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ func setTags(claim *model.Claim, tags []string) error {

func setLicense(claim *model.Claim, stream pb.Stream) {
license := stream.GetLicense()
if len(license) > 500 {
if len([]rune(license)) > 500 {
license = string([]rune(license)[:500])
}
if utf8.ValidString(license) {
Expand Down

0 comments on commit fb43c9a

Please sign in to comment.