Skip to content

Commit 9f2a4b6

Browse files
author
yangsen
committed
uplog: value max to 1K
1 parent b0c465b commit 9f2a4b6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

QiniuSDK/Collect/QNReportItem.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ - (void)setReportValue:(id _Nullable)value forKey:(NSString * _Nullable)key{
3737
if (!value || !key || ![key isKindOfClass:[NSString class]]) {
3838
return;
3939
}
40+
if ([value isKindOfClass:[NSString class]] && [(NSString *)value length] > 1024) {
41+
value = [(NSString *)value substringToIndex:1024];
42+
}
4043
[self.keyValues setValue:value forKey:key];
4144
}
4245

0 commit comments

Comments
 (0)