Closed just-ole closed 1 year ago
@just-ole What device and version are you on?
got introduced in https://github.com/mattermost/mattermost-mobile/commit/1777a4f7504271fccf123e50589a5edc6ffb8ea3 and is still in master so all versions after that and since I already located the bug in the code I didn't bother to find out which version was the latest in the google play store at that point of opening that issue especially since it should be easier to for you to figure that out yourself than it is for me
@just-ole would you be willing to submit a PR?
Actually we should remove that entire code block, is been there for 18 months or so and now the sender name is set in the notification bundle and no longer in the message.
haven't wrote a single line of java in over 5 years, so I won't touch anything
Closing since this should be already solved.
yeah looks like #4707 fixed it
https://github.com/mattermost/mattermost-mobile/blob/master/android/app/src/main/java/com/mattermost/rnbeta/CustomPushNotification.java
the user controlled string
senderName
is passed toString.replaceFirst
which expects the first argument to be a regex without any sanitizing which can crash the app by usingTHE User ;-)
as namebut thats all I have time to investigate atm
current version in the play store is affected according to a colleague and according to him the non beta version was crashing before as well
here is the exception he copied from a screenshot and pasted into our channel the only thin I changed was replacing the actual username with the word username but the real username matches
[A-Z][a-z]+