Commit graph

2879 commits

Author SHA1 Message Date
Scott Nonnenberg
0b0214cbf9 Some fixes for windowed render 2019-08-21 14:55:12 -07:00
Scott Nonnenberg
e4d2e28ec4 Make identity key screen show up immediately 2019-08-21 14:52:30 -07:00
Scott Nonnenberg
c39d5a811a Full-text search within conversation 2019-08-21 14:52:30 -07:00
Scott Nonnenberg
9d4f2afa5a Persist drafts 2019-08-21 14:52:30 -07:00
Scott Nonnenberg
5ebd8bc690 Virtualize Messages List - only render what's visible 2019-08-21 14:52:30 -07:00
Scott Nonnenberg
a976cfe6b6 Time out faster for IndexedDB existence checks 2019-08-21 14:52:30 -07:00
Ken Powers
79bba52cfb Large Message Composition 2019-08-21 14:52:30 -07:00
Scott Nonnenberg
d42eb2126e Changes to View Once 2019-08-05 16:23:47 -07:00
Scott Nonnenberg
adf21985c1 Use MessageController whenever we create a new Message 2019-08-05 16:23:47 -07:00
Scott Nonnenberg
cb9ba0fe7f Re-register support for sealed sender when a device is re-linked 2019-08-05 16:23:47 -07:00
Ken Powers
6c0365a770 One emoji image set for picker, composition, message bubble 2019-07-25 09:28:44 -07:00
Ken Powers
464361b2eb Animate in-conversation panels on show/hide 2019-07-25 09:24:03 -07:00
Scott Nonnenberg
df74103335 Two small changes
* Signed prekey rotation: better logging, let => const

* Ensure that we remove sync messages from cache
2019-07-19 09:35:04 -04:00
Scott Nonnenberg
de78d42ad5 Change group_update field of message after avatar download queued 2019-07-17 11:29:51 -07:00
Scott Nonnenberg
e09fa7b402 Ensure suggested attachment filenames are consistent 2019-07-17 11:29:51 -07:00
Scott Nonnenberg
cb2c691667 Improve queuing strategies in the app 2019-07-17 11:29:51 -07:00
Ken Powers
7b645011c2 New composition area with emoji typeahead 2019-07-17 11:29:51 -07:00
Scott Nonnenberg
e62a1a7812 Receive support for View Once photos 2019-07-17 11:29:51 -07:00
Ken Powers
fccf1eec30 Fix file size limitation 2019-07-16 14:48:40 -07:00
Disconnect3d
fa4b2d412f Fix SUPPORTED_MEDIA_DOMAINS regex whitelist (#3459)
The `SUPPORTED_MEDIA_DOMAINS` regex whitelist, used to check if media link comes from trusted hosts is invalid. It does not expose a security risk or I couldn't find an example for such as of now, but if someone would add a subdomain host to it using the same pattern, it would.

A counter example below:
```js
const SUPPORTED_MEDIA_DOMAINS = /^([^.]+\.)*(ytimg.com|cdninstagram.com|redd.it|imgur.com|fbcdn.net|pinimg.com)$/i;

console.log('Testing redd.it: ' + SUPPORTED_MEDIA_DOMAINS.test('redd.it'));
console.log('Testing reddjit: ' + SUPPORTED_MEDIA_DOMAINS.test('reddjit'));
```

Output:
```
$ node example.js
Testing redd.it: true
Testing reddjit: true
```

---

To be more clear, if someone would extend the regex in the future with e.g. `media.redd.it`, an attacker would be able to create a `mediaXredd.it` domain and bypass the whitelist.

---

A visualisation of the incorrect regex can be found on https://regexper.com/#%5E%28%5B%5E.%5D%2B%5C.%29*%28ytimg.com%7Ccdninstagram.com%7Credd.it%7Cimgur.com%7Cfbcdn.net%7Cpinimg.com%29%24

The issue has been found with LGTM: b626ef0b64/files/js/modules/link_previews.js (xdabadfc2bf20f0c3):1
2019-07-16 13:28:16 -07:00
Ken Powers
cb272111ab Run yarn format 2019-07-08 16:29:45 -04:00
Scott Nonnenberg
0df9b4b8fb Prevent multiple parallel signed prekey rotations
* Prevent multiple parallel signed prekey rotations

* When logging error, recalculate id to capture sealed sender info
2019-07-03 14:56:49 -04:00
AJ Jordan
22f5c01247 Fix typo (#3345) 2019-06-28 13:07:00 -04:00
Scott Nonnenberg
569acb091c Migrate from IndexedDB before doing new version checks 2019-06-27 15:21:08 -07:00
Scott Nonnenberg
cc4886caa5 Ensure only one active attachment download setTimeout 2019-06-24 13:39:37 -07:00
Scott Nonnenberg
ab2cc6ee53 Properly download new group avatars 2019-06-24 14:51:33 -04:00
Scott Nonnenberg
d97dae6a87 Capture id after first save for incoming error messages 2019-06-24 14:47:43 -04:00
Scott Nonnenberg
3feb0037e5 Ensure that long message attachments don't show in media gallery 2019-06-21 16:13:42 -07:00
Scott Nonnenberg
102b93241c Only preload emoji after the window is fully loaded 2019-06-20 17:48:54 -07:00
Scott Nonnenberg
6c8bce7b9f Fix incorrect contentType/extension for outgoing resized image attachments
* Use contentType from conversion when resizing outgoing images

* Update outgoing filename with proper extension after resize
2019-06-19 11:51:23 -04:00
Scott Nonnenberg
cc7b9da0cf Ensure that all event handling in background.js is queued 2019-06-14 18:17:37 -04:00
Scott Nonnenberg
e19067861e ConversationView - extract all header setup into new method 2019-06-11 11:07:56 -04:00
Scott Nonnenberg
9fd867fdd1 Support new 'requiredProtocolVersion' in DataMessage
* Add new requiredProtocolVersion field to DataMessage

* Message.requiredProtocolVersion, warning if version mot supported

* Update strings; limit width; new left pane preview text
2019-06-10 17:40:02 -04:00
Scott Nonnenberg
dd98477479 For 'me,' prefer signal profile avatar over address book info 2019-06-07 14:40:34 -04:00
Scott Nonnenberg
3505ab9198 Drop profile on missing profile key, drop avatar on download 403 2019-06-07 13:20:39 -04:00
Ken Powers
d23efc6717 Send message when pressing enter in the emoji picker 2019-05-31 14:58:53 -07:00
Ken Powers
a934759e66 Maintain last-known cursor position for inserting emojis 2019-05-30 16:37:28 -07:00
Scott Nonnenberg
344885d8b1 Focus message box on emoji panel close, don't dismiss on shift 2019-05-30 12:43:18 -07:00
Ken Powers
feb4da874b Enable keyboard navigation in EmojiPicker. 2019-05-30 12:43:18 -07:00
Scott Nonnenberg
86a38d2f2b Exclude invalid recent emoji, simplify items redux structure 2019-05-30 12:43:18 -07:00
Scott Nonnenberg
b221dcff5a Only use attemptedStatus on re-download if it is 'installed' 2019-05-30 12:43:18 -07:00
Ken Powers
be5d0837f8 Support additional sticker states
Co-authored-by: scott@signal.org
Co-authored-by: ken@signal.org
2019-05-29 11:01:32 -07:00
Scott Nonnenberg
41880cfe66 Add some logging for debug log upload 2019-05-28 17:24:28 -07:00
Ken Powers
0e9d549cf3 Fuzzy-Searchable Emoji Picker 2019-05-24 17:03:13 -07:00
Scott Nonnenberg
2f47a3570b Update NetworkStatusView on message error instead of plain render 2019-05-24 13:14:51 -04:00
Scott Nonnenberg
e18b6bed1f Refactor 'waiting' flags into one location, fix timestamp check 2019-05-16 17:15:54 -07:00
Ken Powers
fd36720079 Add "system" theme setting for MacOS 2019-05-16 17:15:54 -07:00
Scott Nonnenberg
47e46e0f43 Improved handling of group changes 2019-05-16 17:15:54 -07:00
Ken Powers
29de50c12a Stickers
Co-authored-by: scott@signal.org
Co-authored-by: ken@signal.org
2019-05-16 16:10:37 -07:00
Scott Nonnenberg
13ad4abaea Handle and send isRecipientUpdate sync messages
* Handle and send isRecipientUpdate sync messages
* Disable sending isRecipientUpdates for now
2019-05-16 15:43:29 -07:00
Scott Nonnenberg
8c365b1a3a Don't add duplicate errors to the database 2019-05-16 15:43:29 -07:00
Scott Nonnenberg
26a3342d2a Padded attachments, attachments v2
* Handle incoming padded attachments
* Attachments v2 - multipart form POST, and direct CDN GET access
* Pad outgoing attachments before encryption (disabled for now)
2019-05-16 15:43:29 -07:00
Michael Walker
4a8e0bd466 Add pinterest domain and asset domains for link preview support
Co-authored-by: ken@signal.org
Co-authored-by: @cmswalker
2019-05-16 15:43:29 -07:00
Scott Nonnenberg
5a5bb859e6 Conversation: Update last message after deleting all messages 2019-05-16 15:23:21 -07:00
Scott Nonnenberg
2cae8d3c25 Fix for incorrect checkmarks when syncs were received offline 2019-05-16 15:23:21 -07:00
Scott Nonnenberg
4470f95e9d Move redux setup to central location - background.js 2019-05-16 15:23:21 -07:00
Scott Nonnenberg
c41bc53614 Refactor messages model; New timeline react components 2019-05-16 15:23:21 -07:00
Scott Nonnenberg
d342b23cbc Refactor: Prepare Message function props for conversation scope 2019-05-07 09:41:09 -07:00
Scott Nonnenberg
fca40cb548 Disable keyboard shortcut for conversation archive 2019-04-17 14:19:32 -07:00
Scott Nonnenberg
b31fbcaa17 Don't send if message body is too long 2019-04-16 14:35:16 -07:00
Scott Nonnenberg
22f7a352f9 updateLastMessage: If we don't update last text, clear it 2019-04-12 14:06:34 -07:00
Scott Nonnenberg
62de2a229d Add logging to track synchronization in message processing 2019-04-10 12:15:00 -07:00
Derek Meer
7727dc093e Hides the "Hide menu bar" option on MacOS (#2903)
The "Hide menu bar" option is only applicable to Windows and some Linux distros,
where the menu bar is attached to the Signal window. Therefore, this commit
ensures that it doesn't show up on MacOS. It includes a setting,
isHideMenuBarSupported(), to control the option's appearance. This
commit also includes the tests to make sure isHideMenuBarSupported()
works correctly.

Fixes #2705
2019-04-08 10:25:14 -07:00
Scott Nonnenberg
629dc8737b Fix issue where 'delete messages' was not clickable second time 2019-04-05 17:18:37 -07:00
Scott Nonnenberg
c8ea2e9463 Download and install updates without the help of electron-updater 2019-04-05 17:18:37 -07:00
Scott Nonnenberg
81de5f9a76 Introduce CTRL-E shortcut for archiving a conversation 2019-04-04 17:17:19 -07:00
Scott Nonnenberg
74cb808763 New MessageController as the single place for in-memory messages 2019-04-04 17:17:19 -07:00
Scott Nonnenberg
274949b247 Enable long message send as an attachment 2019-03-29 11:31:15 -07:00
Scott Nonnenberg
4d8fbe95ff Retry send: Always remove all errors and recalculate recipients 2019-03-29 11:31:15 -07:00
Scott Nonnenberg
0c69d725c3 Ensure that we have all conversations in redux store 2019-03-28 17:23:09 -07:00
Scott Nonnenberg
3b140d9b51 Update react-contextmenu to avoid event handler issues un unload 2019-03-20 13:43:24 -07:00
Scott Nonnenberg
7cfd3870d5 Escape XML delimiters for notifications on linux
Thanks to @whitequark for pointing out an inconsistency in the way that
some Linux desktop environments were displaying markup in notifications.
2019-03-18 16:30:53 -07:00
Scott Nonnenberg
8c4d90df07 Send long text as an attachment instead of inline
Remove Android length warning

Handle incoming long message attachments

Show long download pending status in message bubble

Fix the width of the smallest spinner

Remove Android length warning from HTML templates
2019-03-14 17:30:46 -07:00
Scott Nonnenberg
0e5f405b53 Remove unnecessary 'tag' from Notification construction 2019-03-14 12:32:51 -07:00
Scott Nonnenberg
32fa5cccde Send sync sent messages properly in 1-member group 2019-03-13 10:46:00 -07:00
Scott Nonnenberg
c76d537482 Note to Self: On just expire timer update, set TIMER_UPDATE flag 2019-03-13 09:11:39 -07:00
Scott Nonnenberg
768007a269 Message Detail: Ensure that quotes are not clickable 2019-03-12 17:44:14 -07:00
Scott Nonnenberg
6ffbc0ac06 Archive Conversation 2019-03-12 17:44:14 -07:00
Scott Nonnenberg
d72f89d776 Render only visible conversations in left pane 2019-03-12 17:44:14 -07:00
Scott Nonnenberg
b3ac1373fa Move left pane entirely to React 2019-03-12 17:44:14 -07:00
Scott Nonnenberg
bf904ddd12 On attachment save include date, include album index 2019-03-12 17:44:14 -07:00
Scott Nonnenberg
782516186f Move expiring message cleanup after ConversationController.load() 2019-03-12 17:44:14 -07:00
Scott Nonnenberg
e68367fe0d Remove reference to nonexistent view 2019-03-12 17:44:14 -07:00
Scott Nonnenberg
009c58749b Don't continue to log if socket is returning unknown status 2019-03-12 17:44:14 -07:00
Scott Nonnenberg
812f895e12 Bring lastMessage and lastMessageStatus back to conversation 2019-03-12 17:44:14 -07:00
Scott Nonnenberg
dcd16775c3 Note to Self: set expirationStartTimestamp before sending sync 2019-03-12 17:44:14 -07:00
Scott Nonnenberg
eb7ad48951 Only put nbsp before last token in msg body if token is <12 chars 2019-03-12 17:44:14 -07:00
Scott Nonnenberg
ba501a6df6 Fix ASM warnings in MP3 library 2019-03-12 17:44:14 -07:00
Scott Nonnenberg
fbda313d09 Add job details to attachment download log warning 2019-03-12 17:44:14 -07:00
Scott Nonnenberg
ae161c6cf6 Update to Electron 4.x 2019-03-12 17:44:14 -07:00
Scott Nonnenberg
667b2e63f1 Ensure image lightbox is aware of its underlying message changes 2019-03-12 17:44:14 -07:00
Scott Nonnenberg
ae2db9f09a Improve handling for URLs composed of mixed character sets 2019-03-12 17:44:14 -07:00
Scott Nonnenberg
3917ab940e web_api: Fix caching of https.agent objects between requests 2019-02-20 16:51:30 -08:00
Scott Nonnenberg
41ea9ee15b Ensure that we show error'd recipients in message details screen 2019-02-20 16:51:30 -08:00
Scott Nonnenberg
ad53423e0a Queue quote reference handling per convo in handleDataMessage 2019-02-20 16:51:30 -08:00
Scott Nonnenberg
5165eb3bd4 On database error: show popup, allow user to delete and relaunch 2019-02-20 16:51:30 -08:00
Scott Nonnenberg
3fb6ab295f Debug log optimizations and improvements 2019-02-20 16:51:30 -08:00
Scott Nonnenberg
9afea3ae2b View All Media: Listen for updates to conversation, re-render 2019-02-20 16:51:30 -08:00
Scott Nonnenberg
d4eacda649 Disable import/export outside of test mode; not currently used 2019-02-20 16:51:30 -08:00
Scott Nonnenberg
77ae717b9b Clean up shutdown handling - stop processing incoming messages 2019-02-20 16:51:30 -08:00
Scott Nonnenberg
af40ceda6c Note to Self timer fixes for bugs reported by beta users 2019-02-20 16:40:35 -08:00
Scott Nonnenberg
1b9959aca3 Ensure outgoing attachment size always matches resized image 2019-02-13 16:04:58 -08:00
Scott Nonnenberg
28f96fe893 Ensure that we capture sender even if thrown error is falsey 2019-02-13 16:04:58 -08:00
Scott Nonnenberg
291e8d80cb Fix asm.js errors in emscripten-generated functions 2019-02-13 16:04:58 -08:00
Scott Nonnenberg
5b54c9554e Remove groups table, conversation is single source of truth 2019-02-13 16:04:58 -08:00
Scott Nonnenberg
041fe4be05 Remove JSON column and Backbone Model for unprocessed 2019-02-13 16:04:58 -08:00
Scott Nonnenberg
9c540ab977 Add cache support to Signal Protocol Store 2019-02-13 16:04:58 -08:00
Scott Nonnenberg
1d2c3ae23c Download attachments in separate queue from message processing 2019-02-12 16:34:21 -08:00
Scott Nonnenberg
a43a78731a Note to Self 2019-02-12 16:08:51 -08:00
Scott Nonnenberg
858c7e629f Fine-tune linkification technique for link previews 2019-02-11 18:32:05 -08:00
Scott Nonnenberg
462fa712bc Show members: Pull conversation from group table 2019-02-11 18:32:05 -08:00
Scott Nonnenberg
12739ac82d Ensure we don't add empty attachments to quote 2019-02-11 17:37:33 -08:00
Scott Nonnenberg
1a7df91dbc Fix: Navigation to message via quote click didn't always work 2019-02-08 11:54:22 -08:00
Scott Nonnenberg
0d7480bd92 A number of small fixes for Link Previews 2019-02-05 13:55:55 -08:00
Scott Nonnenberg
1533fcc807 Fail over to all numbers in retry if errors don't have numbers 2019-01-29 16:08:03 -08:00
Scott Nonnenberg
92c071e083 Use the proper method for pulling attachments off disk for retry 2019-01-29 16:08:03 -08:00
Scott Nonnenberg
c936859d09 Fix rendering bug with verified state in updateVerified() 2019-01-29 16:08:03 -08:00
Scott Nonnenberg
374b9db493 Ensure that dialog pops up when permissions denied for voice note 2019-01-29 13:53:14 -08:00
Scott Nonnenberg
813924685e Link Previews 2019-01-29 13:53:14 -08:00
Scott Nonnenberg
0eb4760349 Show contact name on 'send anyway' dialog instead of $name$
Partial fix for #1914
2019-01-29 13:53:14 -08:00
Scott Nonnenberg
1e4b562922 Multiple images can now be selected in file chooser and drag/drop 2019-01-16 10:32:57 -08:00
Scott Nonnenberg
74bbdb88a5 Lint fixes 2019-01-15 10:51:49 -08:00
Scott Nonnenberg
16a821645f Preserve scroll position on toggle emoji panel, add attachment 2019-01-15 10:51:49 -08:00
Scott Nonnenberg
0de54e125c Improve caption editor usability, new 'add attachment' affordance 2019-01-15 10:51:49 -08:00
Scott Nonnenberg
ac1a6d197a Enable sending multiple images in one message 2019-01-15 07:51:06 -08:00
Scott Nonnenberg
7db7a3ad44 Preserve scroll position when adding/removing staged quote 2019-01-14 19:20:45 -08:00
Scott Nonnenberg
b08c10a547 FileInputView: Event on attachment change to hide/show microphone 2019-01-14 17:35:01 -08:00
Scott Nonnenberg
43e5d16020 Support for web socket communication with no signaling key 2019-01-14 10:32:12 -08:00
Scott Nonnenberg
b816638dea Fix some of the notification avatar colors 2019-01-04 12:25:48 -08:00
Scott Nonnenberg
dc9f9dabfd Ensure that caption is shown even for single-image message 2019-01-04 12:25:48 -08:00
Scott Nonnenberg
c0be4718fc Update delivered_to for outgoing with earlier delivery receipts 2019-01-04 12:25:48 -08:00
Scott Nonnenberg
f9ea7be61f Reintroduce single attachment limit 2019-01-04 12:25:48 -08:00
Scott Nonnenberg
985b1d6aa6 New staged attachments UI, multiple image attachments per message 2019-01-04 12:21:26 -08:00
Scott Nonnenberg
e4babdaef0 Updates to backup infrastructure 2019-01-04 12:21:26 -08:00
Scott Nonnenberg
47f834cf5c Encrypt device name on account create, on first launch if needed 2019-01-04 12:21:26 -08:00
Herohtar
a21d63e450 Make notification initials consistent with everything else (#3006)
Make notification initials consistent with Avatar component
2019-01-02 14:34:18 -08:00
Herohtar
0b60af1c84 Don't compare a numeric value with a string when using the identity operator (#2989)
Fix comparison for emoji injection at cursor location
2019-01-02 12:22:47 -08:00
Scott Nonnenberg
3851bf351f Throttle typing events, fix profile logging, fix group typing 2018-12-10 14:06:43 -08:00
Scott Nonnenberg
313d08344a Request configuration sync on startup of new version 2018-11-28 12:35:26 -08:00
Scott Nonnenberg
a291834301 Dismiss typing indicator when ConversationView is not loaded 2018-11-26 17:09:50 -08:00
Scott Nonnenberg
70eed938d9 Store arrayBuffers in database for remote identity keys 2018-11-26 16:22:49 -08:00
Scott Nonnenberg
79a861a870 Typing Indicators 2018-11-26 15:26:04 -08:00
Scott Nonnenberg
99252702e1 Support receiving multiple images in one messages 2018-11-26 15:26:04 -08:00
Scott Nonnenberg
447a217397 Bulletproof getNumberInfo against missing ourNumber 2018-11-26 15:23:25 -08:00
Scott Nonnenberg
a780fa3bab Fix reference to nonexistent variable 2018-11-14 15:25:03 -08:00
Scott Nonnenberg
55c3d9371e Bump sender certificate timer after registration for re-link 2018-11-13 09:44:30 -08:00
Scott Nonnenberg
ecf3f18762 Improve our deletion of IndexedDB post-SQLCipher migration 2018-11-12 15:31:17 -08:00
Scott Nonnenberg
6300256a3e Gracefully shut down database operations before app exit 2018-11-12 15:31:17 -08:00
Scott Nonnenberg
c5f9fae444 A few small bugfixes 2018-11-12 15:31:17 -08:00
Scott Nonnenberg
2d48daa7b6 Refine Sealed Sender behaviors 2018-11-07 16:34:20 -08:00