-
Notifications
You must be signed in to change notification settings - Fork 89
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
Secure backend socket.io from other applications that can access localhost i.e. browser #1940
Conversation
…om main.ts to backend and state manager
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.
Ideally those utility functions for eg. generating random string should be moved to some external files/classes on mobile (obj-c code is already complex enough to be hard to read).
It will work though
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.
Nice job getting this all working! I have a few suggestions, but looks good overall.
packages/mobile/android/app/src/main/java/com/quietmobile/Backend/BackendWorker.kt
Outdated
Show resolved
Hide resolved
|
||
return randomString; | ||
} | ||
|
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.
We should probably use something like: https://developer.apple.com/documentation/security/1399291-secrandomcopybytes
and maybe call it generateSecret
to match other implementations.
|
||
return randomString | ||
} | ||
} |
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.
Same comment as above
We should probably use something like: https://developer.apple.com/documentation/security/1399291-secrandomcopybytes
and maybe call it
generateSecret
to match other implementations.
Also it looks like this is a duplicate of the same function in AppDelegate.m
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.
Looks good, thanks!
* Fix - js injection in message input (#1943) * use notarytool for macos notarization * Secure backend socket.io from other applications that can access localhost i.e. browser (#1940) * secure socket IO connection with token and origin, transform token from main.ts to backend and state manager * Add authorization headers to socketio android notifications client * Secure socketIO connection on iOS * Extend lastKnownPort to lastKnownSocketIOData on android * Handle socketIOSecret for iOS lifecycle event * feat: getRandomValues and concept for validating options on backend * fix: use secure crypto for ios socketio secret --------- Co-authored-by: Vin Kabuki <[email protected]> Co-authored-by: siepra <[email protected]> * feat: notifier component #1980 * feat: use mailto for support address #1980 * fix: building mobile package #1980 * Publish - @quiet/[email protected] - @quiet/[email protected] - [email protected] - [email protected] - [email protected] - @quiet/[email protected] - @quiet/[email protected] * fix: pass team id for notarization * chore: abort build on notarization failure (#2081) * chore: deactivate 'breaking changes warning' for mobile and desktop #2097 #2096 * fix: use default websocket port in case of none --------- Co-authored-by: Kacper Michalik <[email protected]> Co-authored-by: Vin Kabuki <[email protected]> Co-authored-by: Kacper-RF <[email protected]> Co-authored-by: siepra <[email protected]> Co-authored-by: Wiktor Sieprawski <[email protected]> Co-authored-by: [email protected] <[email protected]>
Pull Request Checklist
(Optional) Mobile checklist
Please ensure you completed the following checks if you did any changes to the mobile package: