Skip to content

Commit

Permalink
6.4.0提交
Browse files Browse the repository at this point in the history
  • Loading branch information
garenwang committed May 27, 2024
1 parent 605bc46 commit a8b58a3
Show file tree
Hide file tree
Showing 19 changed files with 74 additions and 22 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
# 6.3.9
# 6.4.0

1、修改getBucket接口漏洞

# 6.3.9

1、高级上传接口支持callback。
2、优化上传contenttype参数。
3、修改WeakSelf为QCloudWeakSelf;
4、修复 其他已知问题。


# 6.3.8

修复断点下载问题


# 6.3.7

1.默认https协议。
2、提供httpdns全局开关。
3、修复6.3.5,6.3.6灯塔crash。
Expand Down
10 changes: 5 additions & 5 deletions QCloudCOSXML.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Pod::Spec.new do |s|
s.name = "QCloudCOSXML"


s.version = "6.3.9"
s.version = "6.4.0"


s.summary = "QCloudCOSXML 腾讯云iOS-SDK组件"
Expand All @@ -20,22 +20,22 @@ s.version = "6.3.9"
s.default_subspec = 'Default'
s.subspec 'Default' do |default|
default.source_files = 'QCloudCOSXML/Classes/**/*','QCloudCOSXML/Classes/QCloudCOSXML/*'
default.dependency "QCloudCore",'6.3.9'
default.dependency "QCloudCore",'6.4.0'
end
s.subspec 'Slim' do |slim|
slim.source_files = 'QCloudCOSXML/Classes/**/*','QCloudCOSXML/Classes/QCloudCOSXML/*'
slim.dependency "QCloudCore/WithoutMTA",'6.3.9'
slim.dependency "QCloudCore/WithoutMTA",'6.4.0'
end
s.subspec 'Transfer' do |transfer|
transfer.source_files = 'QCloudCOSXML/Classes/*','QCloudCOSXML/Classes/Transfer/**/*','QCloudCOSXML/Classes/Base/**/*'
transfer.dependency "QCloudCore/WithoutMTA",'6.3.9'
transfer.dependency "QCloudCore/WithoutMTA",'6.4.0'

end

s.subspec 'Widget' do |widget|
widget.source_files = 'QCloudCOSXML/Classes/*','QCloudCOSXML/Classes/Transfer/**/*','QCloudCOSXML/Classes/Base/**/*'
widget.exclude_files = 'QCloudCOSXML/Classes/Base/QCloudLogManager.h','QCloudCOSXML/Classes/Base/QCloudLogManager.m'
widget.dependency "QCloudCore/WithoutMTA",'6.3.9'
widget.dependency "QCloudCore/WithoutMTA",'6.4.0'
end

end
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ - (instancetype)init {
if (!self) {
return nil;
}
self.maxKeys = 1000;
return self;
}
- (void)configureReuqestSerializer:(QCloudRequestSerializer *)requestSerializer responseSerializer:(QCloudResponseSerializer *)responseSerializer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ - (instancetype)init {
if (!self) {
return nil;
}
self.maxKeys = 1000;
return self;
}
- (void)configureReuqestSerializer:(QCloudRequestSerializer *)requestSerializer responseSerializer:(QCloudResponseSerializer *)responseSerializer {
Expand Down
2 changes: 1 addition & 1 deletion QCloudCOSXML/Classes/QCloudCOSXMLVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#ifndef QCloudCOSXMLModuleVersion_h
#define QCloudCOSXMLModuleVersion_h
#define QCloudCOSXMLModuleVersionNumber 603009
#define QCloudCOSXMLModuleVersionNumber 604000

//dependency

Expand Down
2 changes: 1 addition & 1 deletion QCloudCOSXML/Classes/QCloudCOSXMLVersion.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#import "QCloudCOSXMLVersion.h"
NSString * const QCloudCOSXMLModuleVersion = @"6.3.9";
NSString * const QCloudCOSXMLModuleVersion = @"6.4.0";
NSString * const QCloudCOSXMLModuleName = @"QCloudCOSXML";
@interface QCloudQCloudCOSXMLLoad : NSObject
@end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@
使用分块及续传下载时,指定任务记录文件的路径
*/
@property (strong, nonatomic) NSString *resumableTaskFile;

/// 是否使用路径检查,true为开启,false为关闭,默认为true;。
@property (assign, nonatomic) BOOL objectKeySimplifyCheck;

//针对本次下载行流量控制的限速值,必须为数字,单位默认为 bit/s。限速值设置范围为819200 - 838860800,即100KB/s - 100MB/s,如果超出该范围将返回400错误
@property (nonatomic, assign) NSInteger trafficLimit;
- (void)setCOSServerSideEncyption;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ - (instancetype)init {
if (!self) {
return nil;
}
self.objectKeySimplifyCheck = YES;
_customHeaders = [NSMutableDictionary dictionary];
_requestCacheArray = [NSPointerArray weakObjectsPointerArray];
return self;
Expand Down Expand Up @@ -128,6 +129,7 @@ - (void)fakeStart {
- (void)startGetObject {

QCloudGetObjectRequest *request = [QCloudGetObjectRequest new];
request.objectKeySimplifyCheck = self.objectKeySimplifyCheck;
request.trafficLimit = self.trafficLimit;
request.payload = self.payload;
request.customHeaders = [self.customHeaders mutableCopy];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ RFC 2616 中定义的指定文件下载范围,以字节(bytes)为单位
对象名
*/
@property (strong, nonatomic) NSString *object;

/// 是否禁用路径检查,默认不禁用。
@property (assign, nonatomic) BOOL objectKeySimplifyCheck;

/**
存储桶名
*/
Expand All @@ -142,7 +146,7 @@ RFC 2616 中定义的指定文件下载范围,以字节(bytes)为单位
//针对本次下载行流量控制的限速值,必须为数字,单位默认为 bit/s。限速值设置范围为819200 - 838860800,即100KB/s - 100MB/s,如果超出该范围将返回400错误
@property (nonatomic, assign) NSInteger trafficLimit;

- (void)setFinishBlock:(void (^)(id _Nonnull, NSError *_Nonnull))finishBlock;
- (void)setFinishBlock:(void (^_Nullable)(id _Nullable result, NSError *_Nullable error))finishBlock;

@end
NS_ASSUME_NONNULL_END
30 changes: 28 additions & 2 deletions QCloudCOSXML/Classes/Transfer/request/QCloudGetObjectRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ - (instancetype)init {
if (!self) {
return nil;
}
self.objectKeySimplifyCheck = YES;
return self;
}
- (void)configureReuqestSerializer:(QCloudRequestSerializer *)requestSerializer responseSerializer:(QCloudResponseSerializer *)responseSerializer {
Expand Down Expand Up @@ -73,7 +74,16 @@ - (BOOL)buildRequestData:(NSError *__autoreleasing *)error {
return NO;
}
}


if (self.objectKeySimplifyCheck && [[self simplifyPath:self.object] isEqualToString:@"/"]) {
if (error != NULL) {
*error = [NSError
qcloud_errorWithCode:QCloudNetworkErrorCodeParamterInvalid
message:[NSString stringWithFormat:
@"The Getobject Key is illegal"]];
return NO;
}
}

if (!self.bucket || ([self.bucket isKindOfClass:NSString.class] && ((NSString *)self.bucket).length == 0)) {
if (error != NULL) {
Expand Down Expand Up @@ -163,7 +173,7 @@ - (QCloudSignatureFields *)signatureFields {
return fileds;
}

- (void)setFinishBlock:(void (^)(id _Nonnull result, NSError *_Nonnull error))finishBlock {
- (void)setFinishBlock:(void (^_Nullable)(id _Nullable result, NSError *_Nullable error))finishBlock {

if (finishBlock) {
QCloudWeakSelf(self);
Expand Down Expand Up @@ -194,5 +204,21 @@ - (void)setFinishBlock:(void (^)(id _Nonnull result, NSError *_Nonnull error))fi
return [array copy];
}

- (NSString *)simplifyPath:(NSString *)path {
NSArray *names = [path componentsSeparatedByString:@"/"];
NSMutableArray *stack = [NSMutableArray array];
for (NSString *name in names) {
if ([name isEqualToString:@".."]) {
if (stack.count > 0) {
[stack removeLastObject];
}
} else if (name.length > 0 && ![name isEqualToString:@"."]) {
[stack addObject:name];
}
}
return [@"/" stringByAppendingString:[stack componentsJoinedByString:@"/"]];
}


@end
NS_ASSUME_NONNULL_END
Binary file not shown.
4 changes: 2 additions & 2 deletions QCloudCore.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Pod::Spec.new do |s|
s.name = "QCloudCore"


s.version = "6.3.9"
s.version = "6.4.0"



Expand Down Expand Up @@ -44,7 +44,7 @@ QCloudCore--腾讯云iOS-SDK Foundation。提供腾讯云iOS相关SDK的基础
default.ios.deployment_target = '9.0'
default.osx.deployment_target = "10.12"
default.source_files = 'QCloudCore/Classes/Base/**/*'
default.dependency "QCloudTrack/Beacon","6.3.9"
default.dependency "QCloudTrack/Beacon","6.4.0"
end

s.subspec 'WithoutMTA' do |withoutMTA|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,6 @@ typedef void (^QCloudHTTPRequestConfigure)(QCloudRequestSerializer *_Nonnull req

-(BOOL)needChangeHost;

+(BOOL)needChangeHost:(NSString *)host;
+(BOOL)needChangeHost:(NSString *_Nullable)host;

@end
2 changes: 1 addition & 1 deletion QCloudCore/Classes/Base/QCloudCoreVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#ifndef QCloudCoreModuleVersion_h
#define QCloudCoreModuleVersion_h
#define QCloudCoreModuleVersionNumber 603009
#define QCloudCoreModuleVersionNumber 604000

//dependency

Expand Down
2 changes: 1 addition & 1 deletion QCloudCore/Classes/Base/QCloudCoreVersion.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#import "QCloudCoreVersion.h"
NSString * const QCloudCoreModuleVersion = @"6.3.9";
NSString * const QCloudCoreModuleVersion = @"6.4.0";
NSString * const QCloudCoreModuleName = @"QCloudCore";
@interface QCloudQCloudCoreLoad : NSObject
@end
Expand Down
2 changes: 1 addition & 1 deletion QCloudTrack.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = "QCloudTrack"
s.version = "6.3.9"
s.version = "6.4.0"
s.summary = "QCloudTrack 腾讯云iOS-SDK组件"

# This description is used to generate tags and improve search results.
Expand Down
2 changes: 1 addition & 1 deletion QCloudTrack/Classes/Beacon/QCloudBeaconTrackService.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#import "QCloudBeaconTrackService.h"
#import "QCloudTrackConstants.h"
#import "COSBeaconAPI_Base/COSBeaconReport.h"
#import <COSBeaconAPI_Base/COSBeaconReport.h>
#import "QCloudTrackConstants.h"

void QCloudTrackEnsurePathExist(NSString *path) {
Expand Down
4 changes: 2 additions & 2 deletions QCloudTrack/Classes/QCloudTrackVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

#ifndef QCloudTrackModuleVersion_h
#define QCloudTrackModuleVersion_h
#define QCloudTrackModuleVersionNumber 603009
#define QCloudTrackModuleVersionNumber 604000

//dependency

//
FOUNDATION_EXTERN NSString * const QCloudTrackModuleVersion;
FOUNDATION_EXTERN NSString * const QCloudTrackModuleName;

#endif
#endif
10 changes: 8 additions & 2 deletions QCloudTrack/Classes/QCloudTrackVersion.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#import "QCloudTrackVersion.h"
NSString * const QCloudTrackModuleVersion = @"6.3.9";
NSString * const QCloudTrackModuleVersion = @"6.4.0";
NSString * const QCloudTrackModuleName = @"QCloudTrack";
@interface QCloudQCloudTrackLoad : NSObject
@end
Expand All @@ -13,11 +13,17 @@ + (void) load
@"name" : QCloudTrackModuleName,
@"version" : QCloudTrackModuleVersion
} mutableCopy];

NSString* buglyID = @"";
if (buglyID.length > 0) {
module[@"crashID"] = buglyID;
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
id share = [cla performSelector:@selector(shareInstance)];
[share performSelector:@selector(registerModuleByJSON:) withObject:module];
#pragma clang diagnostic pop
}
}
@end
@end

0 comments on commit a8b58a3

Please sign in to comment.