Commit graph

2989 commits

Author SHA1 Message Date
Ken Powers
a1270867ff Debug Logs: gzip before upload 2020-03-24 17:03:22 -07:00
Ken Powers
4a8f5db0a4 Use Electron Spellchecker 2020-03-24 17:03:22 -07:00
Ken Powers
42152be4af Handle multiple out of order reactions 2020-03-24 17:03:22 -07:00
Ken Powers
37ad95af27 Passive UUID fixes 2020-03-24 17:03:22 -07:00
Scott Nonnenberg
6bd5587d50 Retry websocket connect if error returned is 502
* Retry websocket connect if error returned is 502

* Introduce connect button on 'Disconnected' left-pane dialog

* NetworkStatus: If user clicks connect, show connecting for 5s
2020-03-24 17:03:22 -07:00
Scott Nonnenberg
8d6cba1b43 Eliminate remaining Electron 8 deprecations
* Change systemPreferences.isDarkMode() to nativeTheme.shouldUseDarkColors

* Remove vibrancy parameter to BrowserWindow

* Update curve25519-n; removes context-aware deprecation warning

* Set app.allowRendererProcessReuse = true to remove warning

* Move from deprecated setters to direct property set

* Serialized sender certificates: Store less, store plain object

* isMenuBarAutoHide -> autoHideMenuBar

* UUID: Fix sealed sender indicator on message details screen

* Data._cleanData: Remove function keys, handle null in array

Also:
- run _cleanData when saving attachment download jobs
- remove job from jobs table when the send itself throws error

* _cleanData: Don't dig into strings, booleans, or numbers

* getPropsForMessageDetail: Make it clear what we're reducing

Co-authored-by: Ken Powers <ken@signal.org>
2020-03-24 17:03:01 -07:00
Josh Perez
4830213a12 Sort by inbox position to match phone after link 2020-03-24 17:02:01 -07:00
Ken Powers
a90246cbe5 Passive UUID support
Co-authored-by: Scott Nonnenberg <scott@signal.org>
2020-03-24 16:59:35 -07:00
Ken Powers
6a517e4ef9 Disable spellcheck for non-English Linux users
Temporary workaround to prevent a possible startup hang
2020-03-06 12:34:22 -08:00
Scott Nonnenberg
a840e2e5b1 Remove legacy import flow 2020-03-04 17:12:56 -08:00
blckfalcon
fa052f1486
Windows: Fix context menu when spellchecker is off (#3996) 2020-03-02 17:30:56 -08:00
Scott Nonnenberg
90fef354e4
Enable reply/reactions on messages with no errors array 2020-02-28 16:26:50 -08:00
Josh Perez
60773d28d5
Fix new sticker pack keys 2020-02-24 17:03:55 -08:00
Ken Powers
8d9ccd3c0a
Ensure proper file permissions on startup
Co-authored-by: Scott Nonnenberg <scott@signal.org>
2020-02-21 15:40:04 -08:00
Josh Perez
6b56dd4ce0
Move registration from redux selectors to util 2020-02-21 15:08:21 -08:00
Josh Perez
018dc34e47 Fix for fallback update dialog 2020-02-20 16:24:40 -08:00
Scott Nonnenberg
f379c72aba Lint fixes 2020-02-20 16:24:40 -08:00
Josh Perez
2138395bcb Improve UI around Voice Message limits 2020-02-20 16:24:40 -08:00
Ken Powers
f0028a5cfe Don't linkify invalid URLs 2020-02-19 15:22:37 -08:00
Josh Perez
32c0a8fbf6
Lint fixes 2020-02-19 09:55:35 -08:00
Josh Perez
1881fa5fa5
Add swoon sticker packs as blessed and known
* Add swoon sticker packs as blessed and known
* Do not install blessed packs by default
2020-02-18 14:36:59 -08:00
Josh Perez
9e9401693c
Replace spellchecker in favor of typo-js 2020-02-18 10:58:05 -08:00
Josh Perez
0843f569a0
Adds additional logging to boot path 2020-02-18 10:48:58 -08:00
Scott Nonnenberg
7ca0dfdfbe
Move logic into handleDataMessage for proper queuing 2020-02-14 16:28:35 -05:00
Tom Huzij
3f6d4486f6
Restore macOS full screen shortcut (#3939) 2020-02-12 13:56:28 -08:00
Josh Perez
18fd44f504
Move all status/alert dialogs into the Left Pane 2020-02-12 13:30:58 -08:00
Ken Powers
101070bf42
Prevent replies/reactions on messages with errors 2020-02-07 15:13:46 -08:00
Ken Powers
f37e73c723
Add more logging for reactions handling 2020-02-07 15:12:47 -08:00
Scott Nonnenberg
3938eb9801
A set of fixes and upgrades
* writeToDownloads: Add missing await
* Remove window.isFocused() - not used anywhere!
* Update typescript, p-queue, make necessary changes to fix build
* Slow down sender certificate retries with no existing cert
* Slow down signed prekey refreshes when unlinked - 5s -> 5m
* Update protobufjs to 4.1.2
2020-02-07 14:37:04 -05:00
Ken Powers
7a0197b08c Remove sticker send flag 2020-02-03 12:05:21 -08:00
Ken Powers
539c02cb92 Remove reaction send flag 2020-02-03 12:05:21 -08:00
Ken Powers
01d4aa0772
Update to new message bubble reactions design 2020-02-03 12:02:49 -08:00
Josh Perez
c2d1979c1e Set conversation avatar to null explicitly when missing 2020-01-24 15:50:41 -08:00
Ken Powers
153503efc5 Send Reactions 2020-01-23 15:57:37 -08:00
Ken Powers
109c40e055 Set correct fromId on reactions in all circumstances 2020-01-23 11:52:40 -08:00
Scott Nonnenberg
bfa76b05d2 No propagate, fix 'attachment save' cancel
* Quote: Ensure that clicks don't propagate to parent
* Attachment Save: Check for null; returned if user cancels out
2020-01-22 14:34:36 -05:00
Ken Powers
6cc0f2abce Render incoming Reactions 2020-01-17 14:23:19 -08:00
Scott Nonnenberg
a271fe0eee Add version number to user-agent header on outgoing requests 2020-01-16 21:36:14 -08:00
Scott Nonnenberg
be6ae038dc Ensure sender cert refresh timer resets only when necessary 2020-01-16 21:36:14 -08:00
Scott Nonnenberg
4af7a9ae2c ducks/conversations: Ensure metrics agree with in-memory messages
* ducks/conversations: Ensure metrics agree with in-memory messages
* Clean up logic cleaning up metrics
2020-01-16 11:45:06 -05:00
Scott Nonnenberg
7aaee0cb64 idle timer: don't check window.isFocused, force inactive on blur 2020-01-16 11:41:00 -05:00
Ken Powers
8dbbde6790 Partial Revert "Conversation: Wait for database fetch to add incoming messages"
This partially reverts commit bce711c36dfdb3eefda59a10aabe71058b3e40a2.
2020-01-16 08:34:31 -08:00
Scott Nonnenberg
55eff02872 Reintroduce file chooser dialog for every attachment save 2020-01-15 17:23:02 -05:00
Scott Nonnenberg
a37c239e01 handleDataMessage: Apply out-of-order view sync directly 2020-01-14 12:03:25 -08:00
Scott Nonnenberg
11266cb775 Handle both given and family name in decrypted profile name
* Decrypt given and family names from profile name string
* Handle both given and family name from decrypted profile name
* Ensure we properly handle profiles with no family name
2020-01-13 17:28:28 -05:00
Scott Nonnenberg
4f50c0b093 Use 1x icon in View-once bubbles, explanatory expired toasts 2020-01-10 11:29:51 -05:00
Scott Nonnenberg
1bf9ca7233 Save attachments with macOS quarantine attribute
* Attachments: Always save file to downloads directory, show toast
* Add new build:dev command for casual builds
2020-01-09 14:57:43 -05:00
Scott Nonnenberg
3e5071e340 Conversation: Wait for database fetch to add incoming messages 2020-01-09 09:43:47 -05:00
Ken Powers
0d3b390129 Upgrade Prettier 2020-01-08 09:44:54 -08:00
Scott Nonnenberg
0a4190f83f handleDataMessage: Set convo preview after message processing 2020-01-07 16:29:57 -05:00
Scott Nonnenberg
e5d2952c90 Lint fixes after recent merges 2020-01-06 17:47:40 -08:00
Victor Sheremetov
ddb5e90967 Fixing issue #2689 with broken right click when spell check is disabled (#2708)
Co-authored-by: Scott Nonnenberg <scott@signal.org>
2020-01-06 17:33:20 -08:00
Ken Powers
fe65fd3eaa Sticker creator updates: new 200 sticker max, WebP supported 2019-12-19 15:27:02 -08:00
Scott Nonnenberg
f5be32ba14 Simplify linkification filter - check for ASCII/non-ASCII only 2019-12-18 14:45:11 -05:00
Ken Powers
11d47a8eb9 Sticker Creator 2019-12-17 12:28:46 -08:00
Scott Nonnenberg
2df1ba6e61 Introduce two built-in sticker packs: Zozo and Bandit 2019-12-17 12:28:46 -08:00
Scott Nonnenberg
2c7baad68d macOS shortcuts: Only listen for command key, not control key 2019-12-17 13:52:36 -05:00
Ken Powers
a83f5ce3e0 Drop reaction messages 2019-12-16 15:00:24 -08:00
Scott Nonnenberg
f9b01f007f Don't do any additional processing of unsupported messages 2019-12-16 15:00:24 -08:00
Scott Nonnenberg
3aba4d0d06 Check for duplicate and send delivery receipts in per-convo queue 2019-12-16 15:00:24 -08:00
Scott Nonnenberg
5f58be1a29 Set focus properly in confirmation dialogs when in mouse mode 2019-12-16 15:00:24 -08:00
Scott Nonnenberg
38e9ddef40 Add logging to help track down 401s during registration 2019-12-03 16:29:03 -08:00
Scott Nonnenberg
e9f08c3da9 Bugfixes for v1.29
* If focus was set to document.body during archive, focus left pane
* Shortcut Guide: Add space between text and shortcut highlight
* Ensure that draft attachment can be closed with click on X button
* Move to keyDown event for user idle checking
* Additional resiliency around avatars; check for them on on-disk
* Increase timeouts to preserve websocket connection
* On startup, be resilient to malformed JSON in log files
* Don't crash if shell.openExternal returns an error
* Whenever we request a contact/group sync, also request block list
* Avatar popup: Ensure styling is mouse- and keyboard-appropriate
* MainHeader: Create popperRoot on demand, not on mount
* CompositionInput: Disable default Ctrl-/ shortcut
* Update libphonenumber
2019-12-03 15:02:50 -05:00
jjkaufman
ee9e86ab7a Show message sent time (not received time) in search results (#3769) 2019-12-02 13:40:38 -08:00
Scott Nonnenberg
2a0a73cfc1 Keyboard/mouse mode and keyboard support bugfixes 2019-11-21 14:16:06 -05:00
Scott Nonnenberg
e23d7a75b0 Open conversation menu: Ctrl-Shift-I -> Ctrl-Shift-L 2019-11-15 14:34:24 -08:00
Scott Nonnenberg
5750412fda Hover/focus styles for embedded contacts, default action 2019-11-15 14:34:24 -08:00
Scott Nonnenberg
bb02fa3a7e Prevent conversation up/down when showing search results 2019-11-15 14:34:24 -08:00
Scott Nonnenberg
6b60ca6bd7 Handle Ctrl+/ in the application instead of via Electron
To prevent 'select all' on Linux.
2019-11-15 14:34:24 -08:00
Scott Nonnenberg
3c6e23cc5e Shortcuts: Check for both capital and lowercase characters 2019-11-14 12:37:28 -08:00
Scott Nonnenberg
20a892247f Keyboard shortcuts and accessibility 2019-11-13 16:53:42 -08:00
Scott Nonnenberg
8590a047c7 Change domain for sharing sticker packs 2019-11-13 19:12:36 -05:00
Scott Nonnenberg
43ec99f5d8 Ensure heartbeat interval starts even if we start up expired 2019-11-13 18:25:57 -05:00
Scott Nonnenberg
fa70fa2ecf Track last use via heartbeat instead of by last startup 2019-11-12 17:56:57 -05:00
Scott Nonnenberg
edba3a522a Fix View Once Video, fix Permissions Popup
* Ensure we're ready to handle incoming View Once messages
* Ensure that permissions popup initializes fully
2019-11-07 15:07:37 -05:00
Scott Nonnenberg
b85943b688 Ensure that loading screen progress includes all message types 2019-11-04 11:58:22 -08:00
Scott Nonnenberg
a905b2c656 ConversationView.unload: Remove CompositionArea component 2019-11-04 10:53:56 -08:00
Ken Powers
8659f1dd23 Fix a number of emoji bugs in message composer 2019-10-31 12:32:10 -07:00
Scott Nonnenberg
fd5af8bb62 SessionRecord: Once again serialize/deserialize within libsignal 2019-10-30 12:12:30 -07:00
Scott Nonnenberg
785e31b154 SettingsView: Remove unused localization strings 2019-10-30 12:12:30 -07:00
Scott Nonnenberg
dd1f9b055f New AvatarPopup component 2019-10-17 14:22:07 -04:00
Scott Nonnenberg
05439c6cd6 ConversationStack: Unset lastConversation on model unload 2019-10-17 13:35:35 -04:00
Scott Nonnenberg
1632e19476 Startup message counter: increment on message processing complete 2019-10-17 13:18:10 -04:00
Scott Nonnenberg
c81c25bb85 Update colors, icons, and fonts 2019-10-10 14:56:14 -07:00
Scott Nonnenberg
28aed8247f MessageReceiver: Remove contact/group sync from cache immediately 2019-10-10 14:56:14 -07:00
Scott Nonnenberg
0f93c780ec Kick off checks for updates in more situations 2019-10-10 14:56:14 -07:00
Scott Nonnenberg
5c00b89600 Support for receiving View Once Video 2019-10-10 14:56:14 -07:00
Scott Nonnenberg
9cda14c4f2 On startup after 30+ days, delete local encryption info 2019-10-10 14:56:14 -07:00
Scott Nonnenberg
0c09f9620f Improve message download performance 2019-10-10 14:56:14 -07:00
Scott Nonnenberg
7ab2d9acc6 Video Thumbnails: Seek to 1s mark in video before capture 2019-09-24 13:43:08 -07:00
Scott Nonnenberg
8ccb89310b New Idle timer; messages not marked read if user is idle 2019-09-24 13:43:08 -07:00
Scott Nonnenberg
b77246a7e0 When SQLITE_CORRUPT error happens, immediately restart the app 2019-09-24 13:43:08 -07:00
Scott Nonnenberg
ca43f52151 Message: Ensure that change event always has getReduxData() data 2019-09-18 16:08:46 -07:00
Scott Nonnenberg
344e7e5e76 Attachment-add flow: capture renamed filename, file type checks 2019-09-18 16:08:46 -07:00
Scott Nonnenberg
3719724337 Prevent multiple instances of same background attachment job 2019-09-18 16:08:46 -07:00
Scott Nonnenberg
92235678b5 Only re-save and re-sort conversation if draft has changed 2019-09-18 16:08:46 -07:00
Scott Nonnenberg
095cd884a2 Prevent >64k text in composition box; truncate too-large drafts 2019-09-16 15:47:52 -07:00
Scott Nonnenberg
5bd9964ed2 Windows: Reintroduce flash frame when we trigger a notification 2019-09-06 16:04:31 -04:00
Scott Nonnenberg
e011589a5e A number of performance tweaks 2019-09-06 12:19:50 -07:00
Scott Nonnenberg
35e943e817 Fix access to safety number view from group members screen 2019-09-05 14:18:44 -04:00
Scott Nonnenberg
1ab844674a Ensure out-of-band attachment updates make new top-level objects 2019-09-03 20:07:47 -04:00
Scott Nonnenberg
15af1eea7a Only update drafts in left pane when conversation is closed 2019-09-03 18:41:21 -04:00
Scott Nonnenberg
936768d9c1 Recalculate message height when pending sticker is loaded 2019-08-22 15:41:55 -07:00
Scott Nonnenberg
b19659f5ac Address beta feedback
* Use signal blue for search box focus outline
* Reduce debounce for draft saves
* Be less aggressive in our scrolling corrections
* Lightbox: Ensure that a tall image is still fully visible
* Fix spell checking after Electron API breaking changes
* Fix link preview image generation
* Message highlight: Move to border in signal blue
2019-08-22 17:11:36 -04:00
Scott Nonnenberg
90c2a97aa7 Address alpha feedback 2019-08-21 14:55:18 -07:00
Scott Nonnenberg
ca6f7471f1 Remove all calls to flashFrame() 2019-08-21 14:55:12 -07:00
Scott Nonnenberg
d3d2b0ec52 Use curve functions from native module 2019-08-21 14:55:12 -07:00
Scott Nonnenberg
e29eee4583 Update Electron to 6.0.1, SQLCipher to 4.2.0 2019-08-21 14:55:12 -07:00
Scott Nonnenberg
6ac7f4ccf6 Two fixes for messages causing errors
* Queue delivery receipt sends, only start after we get 'empty'
* Retry cached two minutes after empty, or any post-empty message
2019-08-21 14:55:12 -07:00
Scott Nonnenberg
b5ebd034db Don't render left pane until we're done processing initial queue 2019-08-21 14:55:12 -07:00
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