session-android/src/org/thoughtcrime/securesms
Sam Lanning 69f180a5ec Fix some potential integer overflows for expiration time
In a number of locations in the code, there were conversions of message
expiration times from seconds to milliseconds, and then assigned to `long`
contexts. However these conversions were being done as integer multiplication
rather than long multiplication, meaning that there was a potential for
overflows.

Specifically, the maximum value that could be represented before overflowing
was (2^31 / 1000 / 60 / 60 / 24) days = 24.8 days (< 1 month). Luckily the
current allowed timeouts are all less than that value, but this fix would
remove the artificial restriction, effectively allowing values of 1000x greater
(68 years), at least for android.

Related #5775
Closes #7338
2018-03-07 09:55:24 -08:00
..
animation Update registration flow 2017-11-14 10:50:17 -08:00
attachments Migrate from SQLite and ciphertext blobs to SQLCipher + KeyStore 2018-01-30 17:27:05 -08:00
audio Migrate from SQLite and ciphertext blobs to SQLCipher + KeyStore 2018-01-30 17:27:05 -08:00
backup Add chunk IV to chunk MAC 2018-03-05 16:11:49 -08:00
color
components Make some inner classes static 2018-03-07 09:51:05 -08:00
contacts Migrate from SQLite and ciphertext blobs to SQLCipher + KeyStore 2018-01-30 17:27:05 -08:00
crypto Support for full backup/restore to sdcard 2018-03-05 16:11:49 -08:00
database Support for full backup/restore to sdcard 2018-03-05 16:11:49 -08:00
dependencies Support for Registration Lock PINs 2018-03-05 16:13:56 -08:00
events Show dialog if another device registered with same number 2017-11-15 16:29:00 -08:00
gcm Support for read receipts 2017-10-01 22:36:52 -07:00
giph More MasterSecret cleanup 2018-02-01 19:22:48 -08:00
glide Update giphy connectivity strategy for glide 2017-11-01 15:51:38 -07:00
groups Migrate from SQLite and ciphertext blobs to SQLCipher + KeyStore 2018-01-30 17:27:05 -08:00
jobs Fix some potential integer overflows for expiration time 2018-03-07 09:55:24 -08:00
lock Support for Registration Lock PINs 2018-03-05 16:13:56 -08:00
mms Send m-notifyresp-ind (NotifyRespInd) for retrieved MMS on Lollipop API 2018-03-06 17:34:31 -08:00
notifications Fix some potential integer overflows for expiration time 2018-03-07 09:55:24 -08:00
permissions Externalize strings 2017-12-08 14:36:56 -08:00
preferences Support for Registration Lock PINs 2018-03-05 16:13:56 -08:00
profiles Support for selective permissions 2017-11-30 10:26:41 -08:00
providers Manually calculate attachment offsets 2018-02-24 11:09:26 -08:00
push Run all AsyncTasks on thread pool executor 2017-10-23 13:03:32 -07:00
qr
recipients Support for custom call ringtone selection and per-chat ringtones 2018-03-05 16:11:49 -08:00
scribbles Make some inner classes static 2018-03-07 09:51:05 -08:00
service Fix some potential integer overflows for expiration time 2018-03-07 09:55:24 -08:00
sms Remove unnecessary body model 2018-02-01 18:29:09 -08:00
transport
util Make toast after saving attachment translatable 2018-03-07 09:41:33 -08:00
video Make some inner classes static 2018-03-07 09:51:05 -08:00
webrtc Support for custom call ringtone selection and per-chat ringtones 2018-03-05 16:11:49 -08:00
ApplicationContext.java Support for full backup/restore to sdcard 2018-03-05 16:11:49 -08:00
ApplicationPreferencesActivity.java More MasterSecret cleanup 2018-02-01 19:22:48 -08:00
BaseActionBarActivity.java
BaseActivity.java
BasicIntroFragment.java
BindableConversationItem.java Migrate from SQLite and ciphertext blobs to SQLCipher + KeyStore 2018-01-30 17:27:05 -08:00
BindableConversationListItem.java Migrate from SQLite and ciphertext blobs to SQLCipher + KeyStore 2018-01-30 17:27:05 -08:00
BlockedContactsActivity.java More MasterSecret cleanup 2018-02-01 19:22:48 -08:00
ClearProfileAvatarActivity.java Display user profile information in settings activity 2017-08-28 10:30:50 -07:00
ConfirmIdentityDialog.java Remove unnecessary body model 2018-02-01 18:29:09 -08:00
ContactSelectionActivity.java More MasterSecret cleanup 2018-02-01 19:22:48 -08:00
ContactSelectionListFragment.java Migrate from SQLite and ciphertext blobs to SQLCipher + KeyStore 2018-01-30 17:27:05 -08:00
ConversationActivity.java Fix some potential integer overflows for expiration time 2018-03-07 09:55:24 -08:00
ConversationAdapter.java Migrate from SQLite and ciphertext blobs to SQLCipher + KeyStore 2018-01-30 17:27:05 -08:00
ConversationFragment.java Batch selection mode improvements 2018-03-07 09:38:51 -08:00
ConversationItem.java More MasterSecret cleanup 2018-02-01 19:22:48 -08:00
ConversationListActivity.java Support for Registration Lock PINs 2018-03-05 16:13:56 -08:00
ConversationListAdapter.java Migrate from SQLite and ciphertext blobs to SQLCipher + KeyStore 2018-01-30 17:27:05 -08:00
ConversationListArchiveActivity.java More MasterSecret cleanup 2018-02-01 19:22:48 -08:00
ConversationListFragment.java Batch selection mode improvements 2018-03-07 09:38:51 -08:00
ConversationListItem.java Migrate from SQLite and ciphertext blobs to SQLCipher + KeyStore 2018-01-30 17:27:05 -08:00
ConversationListItemAction.java Migrate from SQLite and ciphertext blobs to SQLCipher + KeyStore 2018-01-30 17:27:05 -08:00
ConversationListItemInboxZero.java Migrate from SQLite and ciphertext blobs to SQLCipher + KeyStore 2018-01-30 17:27:05 -08:00
ConversationPopupActivity.java More MasterSecret cleanup 2018-02-01 19:22:48 -08:00
ConversationTitleView.java Make save attachment task toast location instead of snackbar 2017-12-08 15:21:46 -08:00
ConversationUpdateItem.java Remove unnecessary body model 2018-02-01 18:29:09 -08:00
CountrySelectionActivity.java
CountrySelectionFragment.java
CreateProfileActivity.java Use FileProvider for external camera capture Uri on L+ 2017-12-01 11:06:37 -08:00
DatabaseMigrationActivity.java More MasterSecret cleanup 2018-02-01 19:22:48 -08:00
DatabaseUpgradeActivity.java Migrate prekeys into database 2018-03-05 16:11:49 -08:00
DeviceActivity.java More MasterSecret cleanup 2018-02-01 19:22:48 -08:00
DeviceAddFragment.java
DeviceLinkFragment.java
DeviceListFragment.java Run all AsyncTasks on thread pool executor 2017-10-23 13:03:32 -07:00
DeviceListItem.java
DeviceProvisioningActivity.java More MasterSecret cleanup 2018-02-01 19:22:48 -08:00
DummyActivity.java
ExperienceUpgradeActivity.java Delay processing SMS messages until after sqlcipher migration 2018-02-21 18:49:52 -08:00
ExpirationDialog.java Support for full backup/restore to sdcard 2018-03-05 16:11:49 -08:00
GroupCreateActivity.java More MasterSecret cleanup 2018-02-01 19:22:48 -08:00
GroupMembersDialog.java Run all AsyncTasks on thread pool executor 2017-10-23 13:03:32 -07:00
ImportExportActivity.java More MasterSecret cleanup 2018-02-01 19:22:48 -08:00
ImportExportFragment.java Support for full backup/restore to sdcard 2018-03-05 16:11:49 -08:00
IntroPagerAdapter.java
InviteActivity.java More MasterSecret cleanup 2018-02-01 19:22:48 -08:00
LogSubmitActivity.java Update to glide 4.x 2017-10-11 17:47:12 -07:00
MasterSecretListener.java
MediaDocumentsAdapter.java Migrate from SQLite and ciphertext blobs to SQLCipher + KeyStore 2018-01-30 17:27:05 -08:00
MediaGalleryAdapter.java Migrate from SQLite and ciphertext blobs to SQLCipher + KeyStore 2018-01-30 17:27:05 -08:00
MediaOverviewActivity.java More MasterSecret cleanup 2018-02-01 19:22:48 -08:00
MediaPreviewActivity.java More MasterSecret cleanup 2018-02-01 19:22:48 -08:00
MessageDetailsActivity.java More MasterSecret cleanup 2018-02-01 19:22:48 -08:00
MessageDetailsRecipientAdapter.java Migrate from SQLite and ciphertext blobs to SQLCipher + KeyStore 2018-01-30 17:27:05 -08:00
MessageRecipientListItem.java Migrate from SQLite and ciphertext blobs to SQLCipher + KeyStore 2018-01-30 17:27:05 -08:00
MuteDialog.java
NewConversationActivity.java Fix new conversation activity crash 2018-02-01 19:36:09 -08:00
PassphraseActivity.java
PassphraseChangeActivity.java Run all AsyncTasks on thread pool executor 2017-10-23 13:03:32 -07:00
PassphraseCreateActivity.java Migrate from SQLite and ciphertext blobs to SQLCipher + KeyStore 2018-01-30 17:27:05 -08:00
PassphrasePromptActivity.java Migrate to Android fingerprints and auth for Signal screen lock 2018-03-05 16:11:49 -08:00
PassphraseRequiredActionBarActivity.java Correctly lock screen when locked from conversation list 2018-02-26 10:47:41 -08:00
PlayServicesProblemActivity.java
PlayServicesProblemFragment.java
PromptMmsActivity.java More MasterSecret cleanup 2018-02-01 19:22:48 -08:00
PushContactSelectionActivity.java More MasterSecret cleanup 2018-02-01 19:22:48 -08:00
ReadReceiptsIntroFragment.java Synchronize read receipt configuration from splash screen 2017-10-02 12:15:45 -07:00
RecipientPreferenceActivity.java Support for custom call ringtone selection and per-chat ringtones 2018-03-05 16:11:49 -08:00
RegistrationActivity.java Support for Registration Lock PINs 2018-03-05 16:13:56 -08:00
ShareActivity.java More MasterSecret cleanup 2018-02-01 19:22:48 -08:00
SmsSendtoActivity.java No need for a RecipientFactory any longer 2017-08-28 10:30:50 -07:00
TextSecureExpiredException.java
TransportOption.java
TransportOptions.java Support for selective permissions 2017-11-30 10:26:41 -08:00
TransportOptionsAdapter.java
TransportOptionsPopup.java
Unbindable.java
VerifyIdentityActivity.java More MasterSecret cleanup 2018-02-01 19:22:48 -08:00
WebRtcCallActivity.java Support for selective permissions 2017-11-30 10:26:41 -08:00