Merge tag '2.38.1.2'

This commit is contained in:
Michael Kirk 2019-04-04 13:42:07 -06:00
commit 501e2c761f
15 changed files with 99 additions and 69 deletions

View File

@ -60,9 +60,15 @@ def main():
'2.34.0.10', '2.34.0.11', '2.34.0.12', '2.34.0.13', '2.34.0.15', '2.34.0.16', '2.34.0.17', '2.34.0.18', '2.34.0.19', '2.34.0.20', '2.34.0.6', '2.34.0.7', '2.34.0.8', '2.34.0.9',
'2.37.3.0',
'2.37.4.0',
# these were internal release only tags, now we include "-internal" in the tag name to avoid this
'2.38.0.2.1',
'2.38.0.3.1',
'2.38.0.4.1'
'2.38.0.4.1',
# the work in these tags was moved to the 2.38.1 release instead
'2.38.0.12',
'2.38.0.13',
'2.38.0.14',
#
]
tags_of_concern = [tag for tag in tags_of_concern if tag not in tags_to_ignore]

View File

@ -30,7 +30,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.38.0</string>
<string>2.38.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
@ -47,7 +47,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>2.38.0.11</string>
<string>2.38.1.2</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LOGS_EMAIL</key>

View File

@ -484,19 +484,6 @@ const CGFloat kMaxTextViewHeight = 98;
// This is okay because there's only space on screen to perform the
// gesture in one direction.
CGFloat xOffset = fabs(self.voiceMemoGestureStartLocation.x - location.x);
// The lower this value, the easier it is to cancel by accident.
// The higher this value, the harder it is to cancel.
const CGFloat kCancelOffsetPoints = 100.f;
CGFloat cancelAlpha = xOffset / kCancelOffsetPoints;
BOOL isCancelled = cancelAlpha >= 1.f;
if (isCancelled) {
self.voiceMemoRecordingState = VoiceMemoRecordingState_Idle;
[self.inputToolbarDelegate voiceMemoGestureDidCancel];
break;
} else {
[self.inputToolbarDelegate voiceMemoGestureDidUpdateCancelWithRatioComplete:cancelAlpha];
}
CGFloat yOffset = fabs(self.voiceMemoGestureStartLocation.y - location.y);
// require a certain threshold before we consider the user to be
@ -524,6 +511,19 @@ const CGFloat kMaxTextViewHeight = 98;
}
} else {
[self.voiceMemoLockView updateWithRatioComplete:lockAlpha];
// The lower this value, the easier it is to cancel by accident.
// The higher this value, the harder it is to cancel.
const CGFloat kCancelOffsetPoints = 100.f;
CGFloat cancelAlpha = xOffset / kCancelOffsetPoints;
BOOL isCancelled = cancelAlpha >= 1.f;
if (isCancelled) {
self.voiceMemoRecordingState = VoiceMemoRecordingState_Idle;
[self.inputToolbarDelegate voiceMemoGestureDidCancel];
break;
} else {
[self.inputToolbarDelegate voiceMemoGestureDidUpdateCancelWithRatioComplete:cancelAlpha];
}
}
}
break;
@ -569,7 +569,7 @@ const CGFloat kMaxTextViewHeight = 98;
self.voiceMemoUI = [UIView new];
self.voiceMemoUI.backgroundColor = Theme.toolbarBackgroundColor;
[self addSubview:self.voiceMemoUI];
self.voiceMemoUI.frame = CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height);
[self.voiceMemoUI autoPinEdgesToSuperviewEdges];
SET_SUBVIEW_ACCESSIBILITY_IDENTIFIER(self, _voiceMemoUI);
self.voiceMemoContentView = [UIView new];
@ -671,8 +671,7 @@ const CGFloat kMaxTextViewHeight = 98;
[self.recordingLabel autoPinLeadingToTrailingEdgeOfView:imageView offset:5.f];
[cancelLabel autoVCenterInSuperview];
[cancelLabel autoHCenterInSuperview];
[self.voiceMemoUI setNeedsLayout];
[self.voiceMemoUI layoutSubviews];
[self.voiceMemoUI layoutIfNeeded];
// Slide in the "slide to cancel" label.
CGRect cancelLabelStartFrame = cancelLabel.frame;

View File

@ -2938,6 +2938,13 @@ typedef enum : NSUInteger {
didApproveAttachments:(NSArray<SignalAttachment *> *)attachments
messageText:(nullable NSString *)messageText
{
OWSAssertDebug(self.isFirstResponder);
if (@available(iOS 10, *)) {
// do nothing
} else {
[self reloadInputViews];
}
[self tryToSendAttachments:attachments messageText:messageText];
[self.inputToolbar clearTextMessageAnimated:NO];

View File

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
#import "OWSBackup.h"
@ -138,6 +138,10 @@ NSError *OWSBackupErrorWithDescription(NSString *description)
- (void)setup
{
if (!OWSBackup.isFeatureEnabled) {
return;
}
[OWSBackupAPI setup];
[[NSNotificationCenter defaultCenter] addObserver:self

View File

@ -252,7 +252,7 @@
"BLOCK_LIST_UNBLOCK_BUTTON" = "Deblokiraj";
/* Action sheet body when confirming you want to unblock a group */
"BLOCK_LIST_UNBLOCK_GROUP_BODY" = "Existing members will be able to add you to the group again.";
"BLOCK_LIST_UNBLOCK_GROUP_BODY" = "Postojeći članovi moći će Vas ponovo uvrstiti u grupu.";
/* Action sheet title when confirming you want to unblock a group. */
"BLOCK_LIST_UNBLOCK_GROUP_TITLE" = "Unblock This Group?";
@ -435,7 +435,7 @@
"COMPOSE_MESSAGE_CONTACT_SECTION_TITLE" = "Kontakti";
/* Table section header for group listing when composing a new message */
"COMPOSE_MESSAGE_GROUP_SECTION_TITLE" = "Groups";
"COMPOSE_MESSAGE_GROUP_SECTION_TITLE" = "Grupe";
/* Table section header for invite listing when composing a new message */
"COMPOSE_MESSAGE_INVITE_SECTION_TITLE" = "Pozivnica";
@ -516,10 +516,10 @@
"CONTACT_FIELD_MIDDLE_NAME" = "Middle Name";
/* Label for the 'name prefix' field of a contact. */
"CONTACT_FIELD_NAME_PREFIX" = "Prefix";
"CONTACT_FIELD_NAME_PREFIX" = "Prefiks";
/* Label for the 'name suffix' field of a contact. */
"CONTACT_FIELD_NAME_SUFFIX" = "Suffix";
"CONTACT_FIELD_NAME_SUFFIX" = "Sufiks";
/* Label for the 'organization' field of a contact. */
"CONTACT_FIELD_ORGANIZATION" = "Organization";

View File

@ -1515,7 +1515,7 @@
"ONBOARDING_PERMISSIONS_ENABLE_PERMISSIONS_BUTTON" = "Accorder les autorisations";
/* Explanation in the 'onboarding permissions' view. */
"ONBOARDING_PERMISSIONS_EXPLANATION" = "Les informations de vos contacts sont toujours transmises de façon sécurisée.";
"ONBOARDING_PERMISSIONS_EXPLANATION" = "Les renseignements de vos contacts sont toujours transmises de façon sécurisée.";
/* Label for the 'not now' button in the 'onboarding permissions' view. */
"ONBOARDING_PERMISSIONS_NOT_NOW_BUTTON" = "Pas maintenant";

View File

@ -15,7 +15,7 @@
"ACTION_SEND_MESSAGE" = "Invia messaggio";
/* Label for 'share contact' button. */
"ACTION_SHARE_CONTACT" = "Condivi contatto";
"ACTION_SHARE_CONTACT" = "Condividi contatto";
/* Label for 'video call' button in contact view. */
"ACTION_VIDEO_CALL" = "Videochiamata";

View File

@ -96,7 +96,7 @@
"ATTACHMENT_APPROVAL_CAPTION_PLACEHOLDER" = "キャプションの追加...";
/* Title for 'caption' mode of the attachment approval view. */
"ATTACHMENT_APPROVAL_CAPTION_TITLE" = "Caption";
"ATTACHMENT_APPROVAL_CAPTION_TITLE" = "キャプション";
/* Format string for file extension label in call interstitial view */
"ATTACHMENT_APPROVAL_FILE_EXTENSION_FORMAT" = "ファイルの種類:%@";
@ -351,7 +351,7 @@
"CALL_VIEW_DECLINE_INCOMING_CALL_LABEL" = "着信を拒否する";
/* tooltip label when remote party has enabled their video */
"CALL_VIEW_ENABLE_VIDEO_HINT" = "Tap here to turn on your video";
"CALL_VIEW_ENABLE_VIDEO_HINT" = "動画再生はここをタップ";
/* Accessibility label for hang up call */
"CALL_VIEW_HANGUP_LABEL" = "通話を切る";
@ -564,13 +564,13 @@
"CONVERSATION_DELETE_CONFIRMATION_ALERT_TITLE" = "消去しますか?";
/* keyboard toolbar label when no messages match the search string */
"CONVERSATION_SEARCH_NO_RESULTS" = "No matches";
"CONVERSATION_SEARCH_NO_RESULTS" = "見つかりません";
/* keyboard toolbar label when exactly 1 message matches the search string */
"CONVERSATION_SEARCH_ONE_RESULT" = "1 match";
"CONVERSATION_SEARCH_ONE_RESULT" = "ありました";
/* keyboard toolbar label when more than 1 message matches the search string. Embeds {{number/position of the 'currently viewed' result}} and the {{total number of results}} */
"CONVERSATION_SEARCH_RESULTS_FORMAT" = "%d of %d matches";
"CONVERSATION_SEARCH_RESULTS_FORMAT" = "%d %d のうち)";
/* title for conversation settings screen */
"CONVERSATION_SETTINGS" = "会話設定";
@ -624,7 +624,7 @@
"CONVERSATION_SETTINGS_NEW_CONTACT" = "新規の連絡先を作る";
/* Table cell label in conversation settings which returns the user to the conversation with 'search mode' activated */
"CONVERSATION_SETTINGS_SEARCH" = "Search Conversation";
"CONVERSATION_SETTINGS_SEARCH" = "会話の検索";
/* Label for button that opens conversation settings. */
"CONVERSATION_SETTINGS_TAP_TO_CHANGE" = "タップして変える";
@ -1641,13 +1641,13 @@
"PHONE_NUMBER_TYPE_WORK_FAX" = "職場FAX";
/* alert title, generic error preventing user from capturing a photo */
"PHOTO_CAPTURE_GENERIC_ERROR" = "Unable to capture image.";
"PHOTO_CAPTURE_GENERIC_ERROR" = "画像はキャプチャできません";
/* alert title */
"PHOTO_CAPTURE_UNABLE_TO_CAPTURE_IMAGE" = "Unable to capture image.";
"PHOTO_CAPTURE_UNABLE_TO_CAPTURE_IMAGE" = "画像はキャプチャできません";
/* alert title */
"PHOTO_CAPTURE_UNABLE_TO_INITIALIZE_CAMERA" = "Failed to configure camera.";
"PHOTO_CAPTURE_UNABLE_TO_INITIALIZE_CAMERA" = "カメラの設定ができませんでした";
/* label for system photo collections which have no name. */
"PHOTO_PICKER_UNNAMED_COLLECTION" = "無名のアルバム";
@ -2484,7 +2484,7 @@
"UPGRADE_EXPERIENCE_VIDEO_TITLE" = "安全なビデオ電話にようこそ!";
/* Message for the alert indicating that user should upgrade iOS. */
"UPGRADE_IOS_ALERT_MESSAGE" = "Signal will soon require iOS 10 or later. Please upgrade in Settings app >> General >> Software Update.";
"UPGRADE_IOS_ALERT_MESSAGE" = "Signalは、まもなくiOS 10以上だけの対応になります。アップデートしてください。";
/* Title for the alert indicating that user should upgrade iOS. */
"UPGRADE_IOS_ALERT_TITLE" = "iOSを更新する";

View File

@ -1233,10 +1233,19 @@ typedef void (^ProfileManagerFailureBlock)(NSError *error);
});
};
NSURL *avatarUrlPath =
[NSURL URLWithString:userProfile.avatarUrlPath relativeToURL:self.avatarHTTPManager.baseURL];
NSURLRequest *request = [NSURLRequest requestWithURL:avatarUrlPath];
NSURLSessionDownloadTask *downloadTask = [self.avatarHTTPManager downloadTaskWithRequest:request
NSURL *avatarUrl = [NSURL URLWithString:userProfile.avatarUrlPath relativeToURL:self.avatarHTTPManager.baseURL];
NSError *serializationError;
NSMutableURLRequest *request =
[self.avatarHTTPManager.requestSerializer requestWithMethod:@"GET"
URLString:avatarUrl.absoluteString
parameters:nil
error:&serializationError];
if (serializationError) {
OWSFailDebug(@"serializationError: %@", serializationError);
return;
}
__block NSURLSessionDownloadTask *downloadTask = [self.avatarHTTPManager downloadTaskWithRequest:request
progress:^(NSProgress *_Nonnull downloadProgress) {
OWSLogVerbose(
@"Downloading avatar for %@ %f", userProfile.recipientId, downloadProgress.fractionCompleted);

View File

@ -1,14 +1,15 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
NS_ASSUME_NONNULL_BEGIN
@class AFSecurityPolicy;
extern NSString *const OWSCensorshipConfiguration_SouqFrontingHost;
extern NSString *const OWSCensorshipConfiguration_YahooViewFrontingHost;
extern NSString *const OWSCensorshipConfiguration_DefaultFrontingHost;
extern NSString *const OWSFrontingHost_GoogleEgypt;
extern NSString *const OWSFrontingHost_GoogleUAE;
extern NSString *const OWSFrontingHost_GoogleOman;
extern NSString *const OWSFrontingHost_GoogleQatar;
@interface OWSCensorshipConfiguration : NSObject

View File

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
#import "OWSCensorshipConfiguration.h"
@ -11,9 +11,11 @@
NS_ASSUME_NONNULL_BEGIN
NSString *const OWSCensorshipConfiguration_SouqFrontingHost = @"cms.souqcdn.com";
NSString *const OWSCensorshipConfiguration_YahooViewFrontingHost = @"view.yahoo.com";
NSString *const OWSCensorshipConfiguration_DefaultFrontingHost = OWSCensorshipConfiguration_YahooViewFrontingHost;
NSString *const OWSFrontingHost_GoogleEgypt = @"www.google.com.eg";
NSString *const OWSFrontingHost_GoogleUAE = @"www.google.ae";
NSString *const OWSFrontingHost_GoogleOman = @"www.google.com.om";
NSString *const OWSFrontingHost_GoogleQatar = @"www.google.com.qa";
NSString *const OWSFrontingHost_Default = @"www.google.com";
@implementation OWSCensorshipConfiguration
@ -25,7 +27,6 @@ NSString *const OWSCensorshipConfiguration_DefaultFrontingHost = OWSCensorshipCo
return nil;
}
return [self censorshipConfigurationWithCountryCode:countryCode];
}
@ -45,10 +46,9 @@ NSString *const OWSCensorshipConfiguration_DefaultFrontingHost = OWSCensorshipCo
baseURL = [NSURL URLWithString:frontingURLString];
securityPolicy = [self securityPolicyForDomain:(NSString *)specifiedDomain];
} else {
NSString *frontingURLString =
[NSString stringWithFormat:@"https://%@", OWSCensorshipConfiguration_DefaultFrontingHost];
NSString *frontingURLString = [NSString stringWithFormat:@"https://%@", OWSFrontingHost_Default];
baseURL = [NSURL URLWithString:frontingURLString];
securityPolicy = [self securityPolicyForDomain:OWSCensorshipConfiguration_DefaultFrontingHost];
securityPolicy = [self securityPolicyForDomain:OWSFrontingHost_Default];
}
OWSAssertDebug(baseURL);
@ -135,13 +135,17 @@ NSString *const OWSCensorshipConfiguration_DefaultFrontingHost = OWSCensorshipCo
// If the security policy requires new certificates, include them in the SSK bundle
+ (AFSecurityPolicy *)securityPolicyForDomain:(NSString *)domain
{
if ([domain isEqualToString:OWSCensorshipConfiguration_SouqFrontingHost]) {
return [self souqPinningPolicy];
} else if ([domain isEqualToString:OWSCensorshipConfiguration_YahooViewFrontingHost]) {
return [self yahooViewPinningPolicy];
if ([domain isEqualToString:OWSFrontingHost_GoogleEgypt]) {
return self.googlePinningPolicy;
} else if ([domain isEqualToString:OWSFrontingHost_GoogleQatar]) {
return self.googlePinningPolicy;
} else if ([domain isEqualToString:OWSFrontingHost_GoogleOman]) {
return self.googlePinningPolicy;
} else if ([domain isEqualToString:OWSFrontingHost_GoogleUAE]) {
return self.googlePinningPolicy;
} else {
OWSFailDebug(@"unknown pinning domain.");
return [self yahooViewPinningPolicy];
return self.googlePinningPolicy;
}
}
@ -197,7 +201,7 @@ NSString *const OWSCensorshipConfiguration_DefaultFrontingHost = OWSCensorshipCo
return certData;
}
+ (AFSecurityPolicy *)yahooViewPinningPolicy
+ (AFSecurityPolicy *)yahooViewPinningPolicy_deprecated
{
static AFSecurityPolicy *securityPolicy = nil;
static dispatch_once_t onceToken;
@ -209,7 +213,7 @@ NSString *const OWSCensorshipConfiguration_DefaultFrontingHost = OWSCensorshipCo
return securityPolicy;
}
+ (AFSecurityPolicy *)souqPinningPolicy
+ (AFSecurityPolicy *)souqPinningPolicy_deprecated
{
static AFSecurityPolicy *securityPolicy = nil;
static dispatch_once_t onceToken;
@ -221,7 +225,7 @@ NSString *const OWSCensorshipConfiguration_DefaultFrontingHost = OWSCensorshipCo
return securityPolicy;
}
+ (AFSecurityPolicy *)googlePinningPolicy_deprecated
+ (AFSecurityPolicy *)googlePinningPolicy
{
static AFSecurityPolicy *securityPolicy = nil;
static dispatch_once_t onceToken;

View File

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
#import "OWSCountryMetadata.h"
@ -63,7 +63,7 @@ NS_ASSUME_NONNULL_BEGIN
[OWSCountryMetadata countryMetadataWithName:@"Andorra" tld:@".ad" frontingDomain:nil countryCode:@"AD"],
[OWSCountryMetadata countryMetadataWithName:@"United Arab Emirates"
tld:@".ae"
frontingDomain:OWSCensorshipConfiguration_SouqFrontingHost
frontingDomain:OWSFrontingHost_GoogleUAE
countryCode:@"AE"],
[OWSCountryMetadata countryMetadataWithName:@"Afghanistan" tld:@".af" frontingDomain:nil countryCode:@"AF"],
[OWSCountryMetadata countryMetadataWithName:@"Antigua and Barbuda"
@ -157,7 +157,7 @@ NS_ASSUME_NONNULL_BEGIN
[OWSCountryMetadata countryMetadataWithName:@"Estonia" tld:@".ee" frontingDomain:nil countryCode:@"EE"],
[OWSCountryMetadata countryMetadataWithName:@"Egypt"
tld:@".eg"
frontingDomain:OWSCensorshipConfiguration_SouqFrontingHost
frontingDomain:OWSFrontingHost_GoogleEgypt
countryCode:@"EG"],
[OWSCountryMetadata countryMetadataWithName:@"Spain" tld:@".es" frontingDomain:nil countryCode:@"ES"],
[OWSCountryMetadata countryMetadataWithName:@"Ethiopia" tld:@".et" frontingDomain:nil countryCode:@"ET"],
@ -255,7 +255,7 @@ NS_ASSUME_NONNULL_BEGIN
[OWSCountryMetadata countryMetadataWithName:@"New Zealand" tld:@".nz" frontingDomain:nil countryCode:@"NZ"],
[OWSCountryMetadata countryMetadataWithName:@"Oman"
tld:@".om"
frontingDomain:OWSCensorshipConfiguration_SouqFrontingHost
frontingDomain:OWSFrontingHost_GoogleOman
countryCode:@"OM"],
[OWSCountryMetadata countryMetadataWithName:@"Pakistan" tld:@".pk" frontingDomain:nil countryCode:@"PK"],
[OWSCountryMetadata countryMetadataWithName:@"Panama" tld:@".pa" frontingDomain:nil countryCode:@"PA"],
@ -279,7 +279,7 @@ NS_ASSUME_NONNULL_BEGIN
[OWSCountryMetadata countryMetadataWithName:@"Paraguay" tld:@".py" frontingDomain:nil countryCode:@"PY"],
[OWSCountryMetadata countryMetadataWithName:@"Qatar"
tld:@".qa"
frontingDomain:OWSCensorshipConfiguration_SouqFrontingHost
frontingDomain:OWSFrontingHost_GoogleQatar
countryCode:@"QA"],
[OWSCountryMetadata countryMetadataWithName:@"Romania" tld:@".ro" frontingDomain:nil countryCode:@"RO"],
[OWSCountryMetadata countryMetadataWithName:@"Serbia" tld:@".rs" frontingDomain:nil countryCode:@"RS"],

View File

@ -29,8 +29,8 @@ typedef NS_ENUM(NSInteger, TSWhisperMessageType) {
#define textSecureServerURL @"https://textsecure-service.whispersystems.org/"
#define textSecureCDNServerURL @"https://cdn.signal.org"
// Use same reflector for service and CDN
#define textSecureServiceReflectorHost @"textsecure-service-reflected.whispersystems.org"
#define textSecureCDNReflectorHost @"textsecure-service-reflected.whispersystems.org"
#define textSecureServiceReflectorHost @"europe-west1-signal-cdn-reflector.cloudfunctions.net"
#define textSecureCDNReflectorHost @"europe-west1-signal-cdn-reflector.cloudfunctions.net"
#define contactDiscoveryURL @"https://api.directory.signal.org"
#define kUDTrustRoot @"BXu6QIKVz5MA8gstzfOgRQGqyLqOwNKHL6INkv3IHWMF"
#define USING_PRODUCTION_SERVICE

View File

@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>2.38.0</string>
<string>2.38.1</string>
<key>CFBundleVersion</key>
<string>2.38.0.11</string>
<string>2.38.1.2</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>NSAppTransportSecurity</key>