-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[MM-62491] Removing exported receivers. #8466
base: main
Are you sure you want to change the base?
Conversation
+ } else { | ||
+ getReactApplicationContext().registerReceiver(foregroundReceiver, filter); | ||
+ getReactApplicationContext().registerReceiver(foregroundReceiver, filter, null, handler, ContextCompat.RECEIVER_NOT_EXPORTED); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build does not like how this is exported. Need to see how to do this for older android versions since the vulnerability report suggested this but it's failing.
> Task :voximplant_react-native-foreground-service:compileReleaseJavaWithJavac FAILED
/home/runner/work/mattermost-mobile/mattermost-mobile/node_modules/@voximplant/react-native-foreground-service/android/src/main/java/com/voximplant/foregroundservice/VIForegroundServiceModule.java:116: error: cannot find symbol
getReactApplicationContext().registerReceiver(foregroundReceiver, filter, null, handler, ContextCompat.RECEIVER_NOT_EXPORTED);
^
symbol: variable handler
location: class VIForegroundServiceModule
/home/runner/work/mattermost-mobile/mattermost-mobile/node_modules/@voximplant/react-native-foreground-service/android/src/main/java/com/voximplant/foregroundservice/VIForegroundServiceModule.java:116: error: cannot find symbol
getReactApplicationContext().registerReceiver(foregroundReceiver, filter, null, handler, ContextCompat.RECEIVER_NOT_EXPORTED);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PDF says this line is for Android 12 or lower. Android 12 would be Build.VERSION_CODES.S_V2
Build.VERSION_CODES.O
which you specified is Android 8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking back at the code though i think you want >= Build.VERSION_CODES.TIRAMISU (which would be Android 13 and up)
Summary
Mattermost Calls does not need to have the receiver exported. This is disabling that export and securing the use of these to just the Mattermost app.
Ticket Link
https://mattermost.atlassian.net/browse/MM-62491
Checklist
E2E iOS tests for PR
.Device Information
Has not been tested yet, pending an external pipeline where I can test this.
Release Note