Skip to content

Commit

Permalink
[backend] validate mapped vendor string
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter committed Feb 13, 2014
1 parent 01f9e6f commit c16b938
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/backend/bs_productconvert
Expand Up @@ -1169,8 +1169,8 @@ sub getCpeId ($$) {
my $vendor = $product->{vendor};
# SLE people wants sometime short, sometime long version
$vendor = "suse" if $product->{vendor} =~ /^SUSE LINUX/;
die("Vendor contains non valid chars") if $product->{vendor} =~ /[^\-+=\.,0-9:%{}\@#%A-Z_a-z~\200-\377]/s;
die("Vendor contains non valid chars") if $product->{vendor} =~ /[\/:\.\000-\037]/;
die("Vendor contains non valid chars") if $vendor =~ /[^\-+=\.,0-9:%{}\@#%A-Z_a-z~\200-\377]/s;
die("Vendor contains non valid chars") if $vendor =~ /[\/:\.\000-\037]/;
my $cpeid_uri = lc("cpe:".$tag.":".$vendor.":".$product->{name}.":".$product->{version});
return $cpeid_uri;
}
Expand Down

0 comments on commit c16b938

Please sign in to comment.