Bug 2011536 - sanitize intent before interacting with it.#50
Closed
pollym wants to merge 1 commit intomozilla-firefox:autolandfrom
Closed
Bug 2011536 - sanitize intent before interacting with it.#50pollym wants to merge 1 commit intomozilla-firefox:autolandfrom
pollym wants to merge 1 commit intomozilla-firefox:autolandfrom
Conversation
We are seeing `ClassCastException`s in the crash report - this is likely to be happening because some external intent has serialized some class that our app doesn't know about. Calling this `sanitize()` function strips out unknown classes from the bundle. `Intent.putExtra()` will internally call unparcel(), which assumes the bundle is serializable, so we need to call sanitize before doing this.
Contributor
|
View this pull request in Lando to land it once approved. |
jonalmeida
approved these changes
Jan 30, 2026
Contributor
jonalmeida
left a comment
There was a problem hiding this comment.
This is pretty straight-forward fix to me, thanks!
nit: if the change is a speculative fix, can we add that to the commit message so that we know we can re-open the bug if it doesn't fix the all the crashes linked to it.
Contributor
|
testing-exception-other: we ought to test this by monitoring our Nightly audience. Automated testing would not be able to uncover much. |
lando-prod-mozilla bot
pushed a commit
that referenced
this pull request
Feb 2, 2026
We are seeing `ClassCastException`s in the crash report - this is likely to be happening because some external intent has serialized some class that our app doesn't know about. Calling this `sanitize()` function strips out unknown classes from the bundle. `Intent.putExtra()` will internally call unparcel(), which assumes the bundle is serializable, so we need to call sanitize before doing this. [Running a try here](https://treeherder.mozilla.org/jobs?repo=try&revision=9a328763a8bcbf33ecc7e9116aceaa5854f85157) Pull request: #50
|
Pull request closed by commit a2e0bf0 |
akliuxingyuan
pushed a commit
to akliuxingyuan/firefox-android
that referenced
this pull request
Mar 24, 2026
We are seeing `ClassCastException`s in the crash report - this is likely to be happening because some external intent has serialized some class that our app doesn't know about. Calling this `sanitize()` function strips out unknown classes from the bundle. `Intent.putExtra()` will internally call unparcel(), which assumes the bundle is serializable, so we need to call sanitize before doing this. [Running a try here](https://treeherder.mozilla.org/jobs?repo=try&revision=9a328763a8bcbf33ecc7e9116aceaa5854f85157) Pull request: mozilla-firefox/firefox#50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We are seeing
ClassCastExceptions in the crash report - this is likely to be happening because some external intent has serialized some class that our app doesn't know about. Calling thissanitize()function strips out unknown classes from the bundle.Intent.putExtra()will internally call unparcel(), which assumes the bundle is serializable, so we need to call sanitize before doing this.Running a try here