File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ jobs:
109109 - " 8.2"
110110 - " 8.3"
111111 - " 8.4"
112+ - " 8.5"
112113 dependencies :
113114 - lowest
114115 - highest
Original file line number Diff line number Diff line change 6363 "monolog/monolog" : " ^1.3 || ^2.0" ,
6464 "phpunit/phpunit" : " ^9.0 | 8.5.22" ,
6565 "cache/array-adapter" : " ^1.0" ,
66- "symplify/easy-coding-standard" : " 12.5.8 " ,
66+ "symplify/easy-coding-standard" : " 12.6.2 " ,
6767 "phpstan/phpstan" : " ^2.1.6"
6868 },
6969 "config" : {
Original file line number Diff line number Diff line change 3737use Commercetools \Api \Models \Type \TypeReferenceBuilder ;
3838use Commercetools \Api \Models \Type \TypeResourceIdentifierBuilder ;
3939use Commercetools \Base \JsonObject ;
40+ use Commercetools \Client \ApiRequest ;
4041use Commercetools \Client \ClientCredentials ;
4142use Commercetools \Client \ClientFactory ;
4243use GuzzleHttp \Psr7 \Response ;
@@ -297,4 +298,11 @@ public function testCredentials()
297298 $ credentials = new ClientCredentials ("clientId " , "clientSecret " );
298299 $ this ->assertInstanceOf (ClientCredentials::class, $ credentials );
299300 }
301+
302+ public function testPathTraversal ()
303+ {
304+ $ b = new ApiRequestBuilder ();
305+ $ request = $ b ->withProjectKey ('test ' )->carts ()->withId ("../categories " )->get ();
306+ $ this ->assertSame ("test/carts/..%2Fcategories " , $ request ->getUri ()->getPath ());
307+ }
300308}
You can’t perform that action at this time.
0 commit comments