File tree Expand file tree Collapse file tree
main/java/io/spiffe/spiffeid
test/java/io/spiffe/spiffeid Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ public static SpiffeId parse(final String id) {
7272 throw new IllegalArgumentException (EMPTY );
7373 }
7474
75- if (!id .contains (SCHEME_PREFIX )) {
75+ if (!id .startsWith (SCHEME_PREFIX )) {
7676 throw new InvalidSpiffeIdException (WRONG_SCHEME );
7777 }
7878
Original file line number Diff line number Diff line change @@ -98,7 +98,8 @@ static Stream<Arguments> provideInvalidSpiffeIds() {
9898 Arguments .of ("spiffe://trustdomain/./other" , "Path cannot contain dot segments" ),
9999 Arguments .of ("spiffe://trustdomain/../other" , "Path cannot contain dot segments" ),
100100 Arguments .of ("spiffe://trustdomain/" , "Path cannot have a trailing slash" ),
101- Arguments .of ("spiffe://trustdomain/path/" , "Path cannot have a trailing slash" )
101+ Arguments .of ("spiffe://trustdomain/path/" , "Path cannot have a trailing slash" ),
102+ Arguments .of ("xspiffe://trustdomain/path" , "Scheme is missing or invalid" )
102103 );
103104 }
104105
You can’t perform that action at this time.
0 commit comments