Skip to content

Commit

Permalink
Use latest version of protobuf-java to avoid security vulnerability
Browse files Browse the repository at this point in the history
  • Loading branch information
krusche committed Oct 5, 2024
1 parent 3b3a6d0 commit dea4722
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions firebase/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'

implementation "com.google.firebase:firebase-admin:9.3.0"

// use the latest version to avoid security vulnerabilities
// TODO: I don't think we need this dependency, we could also try to exclude it
implementation "com.google.protobuf:protobuf-java:4.28.2"
implementation "com.google.protobuf:protobuf-java-util:4.28.2"

implementation(project(":common"))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public ResponseEntity<Void> send(List<NotificationRequest> requests) {
.toList();

try {
FirebaseMessaging.getInstance(firebaseApp.get()).sendAll(batch);
FirebaseMessaging.getInstance(firebaseApp.get()).sendEach(batch);
} catch (FirebaseMessagingException e) {
return ResponseEntity.status(HttpStatus.EXPECTATION_FAILED).build();
}
Expand Down

0 comments on commit dea4722

Please sign in to comment.