File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,8 @@ class PackageURL {
138
138
throw new Error ( 'A purl string argument is required.' ) ;
139
139
}
140
140
141
- let [ scheme , remainder ] = purl . split ( ':' , 2 ) ;
141
+ let scheme = purl . slice ( 0 , purl . indexOf ( ':' ) )
142
+ let remainder = purl . slice ( purl . indexOf ( ':' ) + 1 )
142
143
if ( scheme !== 'pkg' ) {
143
144
throw new Error ( 'purl is missing the required "pkg" scheme component.' ) ;
144
145
}
Original file line number Diff line number Diff line change 418
418
"qualifiers" : null ,
419
419
"subpath" : null ,
420
420
"is_invalid" : true
421
+ },
422
+ {
423
+ "description" : " colon present in name is a valid PURL" ,
424
+ "purl" : " pkg:maven/:spring-context@5.2.8-RELEASE" ,
425
+ "canonical_purl" : " pkg:maven/:spring-context@5.2.8-RELEASE" ,
426
+ "type" : " maven" ,
427
+ "namespace" : null ,
428
+ "name" : " :spring-context" ,
429
+ "version" : " 5.2.8-RELEASE" ,
430
+ "qualifiers" : null ,
431
+ "subpath" : null ,
432
+ "is_invalid" : false
421
433
}
422
434
]
You can’t perform that action at this time.
0 commit comments