Skip to content

Commit 417df7c

Browse files
authored
Merge pull request #50 from pusher/fix/cve-2025-45769
Fix CVE-2025-45769 and unblock CI
2 parents fc41937 + 6fb0545 commit 417df7c

4 files changed

Lines changed: 52 additions & 52 deletions

File tree

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"require-dev": {
1212
"phpunit/phpunit": "^9.0",
1313
"symfony/yaml": "^5.0 || ^6.0",
14-
"doctrine/instantiator": "1.4.0",
15-
"overtrue/phplint": "^4.0 || ^5.0"
14+
"doctrine/instantiator": "^1.5.0",
15+
"overtrue/phplint": "^4.5 || ^5.5"
1616
},
1717
"autoload": {
1818
"psr-4": {

tests/InterestsTest.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function testPublishToInterestsShouldMakeRequestIfValid(): void {
2222
// Make request
2323
$pushNotifications = new Pusher\PushNotifications\PushNotifications([
2424
"instanceId" => "a11aec92-146a-4708-9a62-8c61f46a82ad",
25-
"secretKey" => "EIJ2EESAH8DUUMAI8EE",
25+
"secretKey" => "EIJ2EESAH8DUUMAI8EE3KL5MNP7QRS9T",
2626
], $client);
2727
$result = $pushNotifications->publishToInterests(
2828
["donuts"],
@@ -49,7 +49,7 @@ public function testPublishToInterestsShouldMakeRequestIfValid(): void {
4949

5050
$expectedHost = "a11aec92-146a-4708-9a62-8c61f46a82ad.pushnotifications.pusher.com";
5151
$expectedContentType = "application/json";
52-
$expectedAuth = "Bearer EIJ2EESAH8DUUMAI8EE";
52+
$expectedAuth = "Bearer EIJ2EESAH8DUUMAI8EE3KL5MNP7QRS9T";
5353
$expectedSDK = "pusher-push-notifications-php 2.0.0";
5454

5555
$expectedBody = [
@@ -94,7 +94,7 @@ public function testPublishToInterestsShouldErrorIfInterestsNotArray(): void {
9494
$this->expectException(TypeError::class);
9595
$pushNotifications = new Pusher\PushNotifications\PushNotifications([
9696
"instanceId" => "a11aec92-146a-4708-9a62-8c61f46a82ad",
97-
"secretKey" => "EIJ2EESAH8DUUMAI8EE",
97+
"secretKey" => "EIJ2EESAH8DUUMAI8EE3KL5MNP7QRS9T",
9898
]);
9999
$pushNotifications->publishToInterests(
100100
null,
@@ -115,7 +115,7 @@ public function testPublishToInterestsShouldErrorIfNoInterests(): void {
115115
$this->expectExceptionMessage("Publishes must target at least one interest");
116116
$pushNotifications = new Pusher\PushNotifications\PushNotifications([
117117
"instanceId" => "a11aec92-146a-4708-9a62-8c61f46a82ad",
118-
"secretKey" => "EIJ2EESAH8DUUMAI8EE",
118+
"secretKey" => "EIJ2EESAH8DUUMAI8EE3KL5MNP7QRS9T",
119119
]);
120120
$pushNotifications->publishToInterests(
121121
[],
@@ -142,7 +142,7 @@ public function testPublishToInterestsShouldErrorIfTooManyInterests(): void {
142142

143143
$pushNotifications = new Pusher\PushNotifications\PushNotifications([
144144
"instanceId" => "a11aec92-146a-4708-9a62-8c61f46a82ad",
145-
"secretKey" => "EIJ2EESAH8DUUMAI8EE",
145+
"secretKey" => "EIJ2EESAH8DUUMAI8EE3KL5MNP7QRS9T",
146146
]);
147147
$pushNotifications->publishToInterests(
148148
$interests,
@@ -163,7 +163,7 @@ public function testPublishToInterestsShouldErrorIfInterestNotString(): void {
163163
$this->expectExceptionMessage("not a string");
164164
$pushNotifications = new Pusher\PushNotifications\PushNotifications([
165165
"instanceId" => "a11aec92-146a-4708-9a62-8c61f46a82ad",
166-
"secretKey" => "EIJ2EESAH8DUUMAI8EE",
166+
"secretKey" => "EIJ2EESAH8DUUMAI8EE3KL5MNP7QRS9T",
167167
]);
168168
$pushNotifications->publishToInterests(
169169
[null],
@@ -191,7 +191,7 @@ public function testPublishToInterestsShouldErrorIfInterestTooLong(): void {
191191

192192
$pushNotifications = new Pusher\PushNotifications\PushNotifications([
193193
"instanceId" => "a11aec92-146a-4708-9a62-8c61f46a82ad",
194-
"secretKey" => "EIJ2EESAH8DUUMAI8EE",
194+
"secretKey" => "EIJ2EESAH8DUUMAI8EE3KL5MNP7QRS9T",
195195
]);
196196
$pushNotifications->publishToInterests(
197197
[$interest],
@@ -215,7 +215,7 @@ public function testPublishToInterestsShouldErrorIfInterestContainsForbiddenChar
215215

216216
$pushNotifications = new Pusher\PushNotifications\PushNotifications([
217217
"instanceId" => "a11aec92-146a-4708-9a62-8c61f46a82ad",
218-
"secretKey" => "EIJ2EESAH8DUUMAI8EE",
218+
"secretKey" => "EIJ2EESAH8DUUMAI8EE3KL5MNP7QRS9T",
219219
]);
220220
$pushNotifications->publishToInterests(
221221
[$interest],
@@ -239,7 +239,7 @@ public function testPublishToInterestsShouldErrorIfInterestIsEmptyString(): void
239239

240240
$pushNotifications = new Pusher\PushNotifications\PushNotifications([
241241
"instanceId" => "a11aec92-146a-4708-9a62-8c61f46a82ad",
242-
"secretKey" => "EIJ2EESAH8DUUMAI8EE",
242+
"secretKey" => "EIJ2EESAH8DUUMAI8EE3KL5MNP7QRS9T",
243243
]);
244244
$pushNotifications->publishToInterests(
245245
[$interest],
@@ -259,7 +259,7 @@ public function testPublishToInterestsShouldErrorIfPublishBodyNotArray(): void {
259259
$this->expectException(TypeError::class);
260260
$pushNotifications = new Pusher\PushNotifications\PushNotifications([
261261
"instanceId" => "a11aec92-146a-4708-9a62-8c61f46a82ad",
262-
"secretKey" => "EIJ2EESAH8DUUMAI8EE",
262+
"secretKey" => "EIJ2EESAH8DUUMAI8EE3KL5MNP7QRS9T",
263263
]);
264264
$pushNotifications->publishToInterests(
265265
["donuts"],
@@ -284,7 +284,7 @@ public function testPublishToInterestsShouldErrorIfBadJsonReturned(): void {
284284
// Make request
285285
$pushNotifications = new Pusher\PushNotifications\PushNotifications([
286286
"instanceId" => "a11aec92-146a-4708-9a62-8c61f46a82ad",
287-
"secretKey" => "EIJ2EESAH8DUUMAI8EE",
287+
"secretKey" => "EIJ2EESAH8DUUMAI8EE3KL5MNP7QRS9T",
288288
], $client);
289289
$result = $pushNotifications->publishToInterests(
290290
["donuts"],
@@ -321,7 +321,7 @@ public function testPublishToInterestsShouldErrorIf4xxErrorReturned(): void {
321321
// Make request
322322
$pushNotifications = new Pusher\PushNotifications\PushNotifications([
323323
"instanceId" => "a11aec92-146a-4708-9a62-8c61f46a82ad",
324-
"secretKey" => "EIJ2EESAH8DUUMAI8EE",
324+
"secretKey" => "EIJ2EESAH8DUUMAI8EE3KL5MNP7QRS9T",
325325
], $client);
326326
$result = $pushNotifications->publishToInterests(
327327
["donuts"],
@@ -358,7 +358,7 @@ public function testPublishToInterestsShouldErrorIf5xxErrorReturned(): void {
358358
// Make request
359359
$pushNotifications = new Pusher\PushNotifications\PushNotifications([
360360
"instanceId" => "a11aec92-146a-4708-9a62-8c61f46a82ad",
361-
"secretKey" => "EIJ2EESAH8DUUMAI8EE",
361+
"secretKey" => "EIJ2EESAH8DUUMAI8EE3KL5MNP7QRS9T",
362362
], $client);
363363
$result = $pushNotifications->publishToInterests(
364364
["donuts"],
@@ -395,7 +395,7 @@ public function testPublishToInterestsShouldErrorIfBadErrorJson(): void {
395395
// Make request
396396
$pushNotifications = new Pusher\PushNotifications\PushNotifications([
397397
"instanceId" => "a11aec92-146a-4708-9a62-8c61f46a82ad",
398-
"secretKey" => "EIJ2EESAH8DUUMAI8EE",
398+
"secretKey" => "EIJ2EESAH8DUUMAI8EE3KL5MNP7QRS9T",
399399
], $client);
400400
$result = $pushNotifications->publishToInterests(
401401
["donuts"],
@@ -432,7 +432,7 @@ public function testPublishToInterestsShouldErrorIfBadErrorSchema(): void {
432432
// Make request
433433
$pushNotifications = new Pusher\PushNotifications\PushNotifications([
434434
"instanceId" => "a11aec92-146a-4708-9a62-8c61f46a82ad",
435-
"secretKey" => "EIJ2EESAH8DUUMAI8EE",
435+
"secretKey" => "EIJ2EESAH8DUUMAI8EE3KL5MNP7QRS9T",
436436
], $client);
437437
$result = $pushNotifications->publishToInterests(
438438
["donuts"],

tests/PushNotificationsTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ final class PushNotificationsTest extends TestCase {
55
public function testConstructorShouldAcceptValidParams(): void {
66
new Pusher\PushNotifications\PushNotifications([
77
"instanceId" => "a11aec92-146a-4708-9a62-8c61f46a82ad",
8-
"secretKey" => "EIJ2EESAH8DUUMAI8EE",
8+
"secretKey" => "EIJ2EESAH8DUUMAI8EE3KL5MNP7QRS9T",
99
]);
1010
$this->assertTrue(true);
1111
}
@@ -19,7 +19,7 @@ public function testConstructorShouldErrorIfInstanceIdNotGiven(): void {
1919
$this->expectException(Exception::class);
2020
$this->expectExceptionMessage("Required 'instanceId'");
2121
new Pusher\PushNotifications\PushNotifications([
22-
"secretKey" => "EIJ2EESAH8DUUMAI8EE",
22+
"secretKey" => "EIJ2EESAH8DUUMAI8EE3KL5MNP7QRS9T",
2323
]);
2424
}
2525

@@ -28,7 +28,7 @@ public function testConstructorShouldErrorIfInstanceIdNotString(): void {
2828
$this->expectExceptionMessage("'instanceId' must be a string");
2929
new Pusher\PushNotifications\PushNotifications([
3030
"instanceId" => null,
31-
"secretKey" => "EIJ2EESAH8DUUMAI8EE",
31+
"secretKey" => "EIJ2EESAH8DUUMAI8EE3KL5MNP7QRS9T",
3232
]);
3333
}
3434

@@ -37,7 +37,7 @@ public function testConstructorShouldErrorIfInstanceIdEmptyString(): void {
3737
$this->expectExceptionMessage("cannot be the empty string");
3838
new Pusher\PushNotifications\PushNotifications([
3939
"instanceId" => "",
40-
"secretKey" => "EIJ2EESAH8DUUMAI8EE",
40+
"secretKey" => "EIJ2EESAH8DUUMAI8EE3KL5MNP7QRS9T",
4141
]);
4242
}
4343

@@ -73,7 +73,7 @@ public function testConstructorShouldErrorIfWrongClientTypeIsGiven(): void
7373
new Pusher\PushNotifications\PushNotifications(
7474
[
7575
"instanceId" => "a11aec92-146a-4708-9a62-8c61f46a82ad",
76-
"secretKey" => "EIJ2EESAH8DUUMAI8EE",
76+
"secretKey" => "EIJ2EESAH8DUUMAI8EE3KL5MNP7QRS9T",
7777
],
7878
[]
7979
);
@@ -84,7 +84,7 @@ public function testConstructorShouldMakeANewClientIfNoneIsGiven(): void
8484
$notification = new Pusher\PushNotifications\PushNotifications(
8585
[
8686
"instanceId" => "a11aec92-146a-4708-9a62-8c61f46a82ad",
87-
"secretKey" => "EIJ2EESAH8DUUMAI8EE",
87+
"secretKey" => "EIJ2EESAH8DUUMAI8EE3KL5MNP7QRS9T",
8888
],
8989
null
9090
);
@@ -100,7 +100,7 @@ public function testConstructShouldUseGivenClient(): void
100100
$notification = new Pusher\PushNotifications\PushNotifications(
101101
[
102102
"instanceId" => "a11aec92-146a-4708-9a62-8c61f46a82ad",
103-
"secretKey" => "EIJ2EESAH8DUUMAI8EE",
103+
"secretKey" => "EIJ2EESAH8DUUMAI8EE3KL5MNP7QRS9T",
104104
],
105105
$client
106106
);

0 commit comments

Comments
 (0)