Skip to content

Conversation

@nidhidavawala
Copy link
Contributor

b/438714642: This change ensures we do not return the internal map but rather a defensive copy of data. Makes our code less vulnerable.

b/438714642: This change ensures we do not return the internal map but rather a defensive copy of data. Makes our code less vulnerable.
@gemini-code-assist
Copy link
Contributor

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

@nidhidavawala nidhidavawala removed the request for review from VinayGuthal October 23, 2025 00:02
@nidhidavawala
Copy link
Contributor Author

/gemini summary

@gemini-code-assist
Copy link
Contributor

Summary of Changes

This pull request introduces a crucial security enhancement to the RemoteMessage class by ensuring that its internal data map is never directly exposed. Instead, the getData() method now returns a new HashMap containing a copy of the data. This change prevents external code from inadvertently or maliciously modifying the internal state of a RemoteMessage object, thereby reducing potential vulnerabilities and improving overall code integrity.

Highlights

  • Security Enhancement: The getData() method in RemoteMessage.java now returns a defensive copy of the internal data map, preventing external modification of the internal state and enhancing the robustness of the class.
Changelog
  • firebase-messaging/src/main/java/com/google/firebase/messaging/RemoteMessage.java
    • Modified the getData() method to return a new HashMap initialized with the existing data map, rather than returning a direct reference to the internal data map.
Activity
  • gemini-code-assist[bot] posted a guide on using Gemini Code Assist.
  • nidhida requested a /gemini summary.

@nidhidavawala nidhidavawala deleted the nidhidavawala-b438714642 branch October 24, 2025 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant