File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
main/java/com/github/packageurl Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -412,7 +412,7 @@ private String validateSubpath(final String value) throws MalformedPackageURLExc
412412 return validatePath (value .split ("/" ), true );
413413 }
414414
415- private static boolean shouldKeepSegment (String segment , boolean isSubpath ) {
415+ private static boolean shouldKeepSegment (final String segment , final boolean isSubpath ) {
416416 return (!isSubpath || (!segment .isEmpty () && !"." .equals (segment ) && !".." .equals (segment )));
417417 }
418418
Original file line number Diff line number Diff line change 4747 "subpath" : " googleapis/api/annotations" ,
4848 "is_invalid" : false
4949 },
50+ {
51+ "description" : " invalid subpath - unencoded subpath cannot contain '..'" ,
52+ "purl" : " pkg:GOLANG/google.golang.org/genproto@abcdedf#/googleapis/%2E%2E/api/annotations/" ,
53+ "canonical_purl" : " pkg:golang/google.golang.org/genproto@abcdedf#googleapis/api/annotations" ,
54+ "type" : " golang" ,
55+ "namespace" : " google.golang.org" ,
56+ "name" : " genproto" ,
57+ "version" : " abcdedf" ,
58+ "qualifiers" : null ,
59+ "subpath" : " googleapis/api/annotations" ,
60+ "is_invalid" : false
61+ },
62+ {
63+ "description" : " invalid subpath - unencoded subpath cannot contain '.'" ,
64+ "purl" : " pkg:GOLANG/google.golang.org/genproto@abcdedf#/googleapis/%2E/api/annotations/" ,
65+ "canonical_purl" : " pkg:golang/google.golang.org/genproto@abcdedf#googleapis/api/annotations" ,
66+ "type" : " golang" ,
67+ "namespace" : " google.golang.org" ,
68+ "name" : " genproto" ,
69+ "version" : " abcdedf" ,
70+ "qualifiers" : null ,
71+ "subpath" : " googleapis/api/annotations" ,
72+ "is_invalid" : false
73+ },
5074 {
5175 "description" : " bitbucket namespace and name should be lowercased" ,
5276 "purl" : " pkg:bitbucket/birKenfeld/pyGments-main@244fd47e07d1014f0aed9c" ,
You can’t perform that action at this time.
0 commit comments