Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent potential SHA-1 hash mismatch in Bugsnag-Integrity header for session requests #1043

Merged
merged 1 commit into from
Dec 14, 2020

Conversation

fractalwrench
Copy link
Contributor

@fractalwrench fractalwrench commented Dec 11, 2020

Goal

Prevents a SHA-1 hash mismatch when the React Native notifier changes the notifier field on startup. Because the Android notifier assigns the event payload value by reference from Client#notifier, the request payload can change between generating a SHA-1 hash and making the request.

Changeset

Copied the notifier parameter when constructing a Session, so that it does not hold a copy of global state.

Testing

Added unit test to verify that the notifier property is always copied when constructing a Session.

@bugsnagbot
Copy link
Collaborator

bugsnagbot commented Dec 11, 2020

Android notifier sizes

Format Size impact of Bugsnag (kB) Size impact of Bugsnag when Minified (kB)
APK 1441.52 1361.29
arm64_v8a 369.24 287.32
armeabi 348.77 266.85
armeabi_v7a 332.39 250.47
x86 410.19 328.27
x86_64 389.72 307.81

Generated by 🚫 Danger

@fractalwrench fractalwrench merged commit 35ca225 into next Dec 14, 2020
@fractalwrench fractalwrench deleted the PLAT-5579/integrity-header-sessions branch December 14, 2020 09:59
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.

None yet

3 participants