com.taptap.sdk.core 4.9.5 → 4.9.6-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
<repositories>
|
|
5
5
|
<repository>https://repo.maven.apache.org/maven2</repository>
|
|
6
6
|
</repositories>
|
|
7
|
-
<androidPackage spec="com.taptap.sdk:tap-core-unity:4.9.
|
|
7
|
+
<androidPackage spec="com.taptap.sdk:tap-core-unity:4.9.6-beta.1" />
|
|
8
8
|
</androidPackages>
|
|
9
9
|
<iosPods>
|
|
10
10
|
<sources>
|
|
11
11
|
<source>https://github.com/CocoaPods/Specs.git</source>
|
|
12
12
|
</sources>
|
|
13
|
-
<iosPod addToAllTargets="false" bitcodeEnabled="false" name="TapTapSDK/Core" version="4.9.
|
|
13
|
+
<iosPod addToAllTargets="false" bitcodeEnabled="false" name="TapTapSDK/Core" version="4.9.6-beta.1" />
|
|
14
14
|
</iosPods>
|
|
15
15
|
</dependencies>
|
|
@@ -205,14 +205,8 @@ namespace TapSDK.Core.Standalone
|
|
|
205
205
|
{
|
|
206
206
|
return;
|
|
207
207
|
}
|
|
208
|
-
if (!
|
|
208
|
+
if (!checkKeyValueLength(key, value))
|
|
209
209
|
{
|
|
210
|
-
TapLog.Error(key + " Property key length should be less than or equal to 256 characters.");
|
|
211
|
-
return;
|
|
212
|
-
}
|
|
213
|
-
if (!checkLength(value))
|
|
214
|
-
{
|
|
215
|
-
TapLog.Error(value + " Property value length should be less than or equal to 256 characters.");
|
|
216
210
|
return;
|
|
217
211
|
}
|
|
218
212
|
Tracker.AddCommonProperty(key, value);
|
|
@@ -351,9 +345,8 @@ namespace TapSDK.Core.Standalone
|
|
|
351
345
|
}
|
|
352
346
|
}
|
|
353
347
|
|
|
354
|
-
private bool checkLength(string value)
|
|
348
|
+
private bool checkLength(string value, int maxLength = 256)
|
|
355
349
|
{
|
|
356
|
-
var maxLength = 256;
|
|
357
350
|
if (value.Length <= 0 || value.Length > maxLength)
|
|
358
351
|
{
|
|
359
352
|
return false;
|
|
@@ -400,14 +393,8 @@ namespace TapSDK.Core.Standalone
|
|
|
400
393
|
{
|
|
401
394
|
foreach (var property in properties)
|
|
402
395
|
{
|
|
403
|
-
if (property.Key
|
|
404
|
-
{
|
|
405
|
-
TapLog.Log(property.Key + " Property key length should be more then 0 and less than or equal to 256 characters.");
|
|
406
|
-
continue;
|
|
407
|
-
}
|
|
408
|
-
if (property.Value.ToString().Length > 256)
|
|
396
|
+
if (!checkKeyValueLength(property.Key, property.Value))
|
|
409
397
|
{
|
|
410
|
-
TapLog.Log(property.Value + " Property value length should be less than or equal to 256 characters.");
|
|
411
398
|
continue;
|
|
412
399
|
}
|
|
413
400
|
filteredProperties.Add(property.Key, property.Value);
|
|
@@ -415,5 +402,30 @@ namespace TapSDK.Core.Standalone
|
|
|
415
402
|
}
|
|
416
403
|
return filteredProperties;
|
|
417
404
|
}
|
|
405
|
+
|
|
406
|
+
private bool checkKeyValueLength(string key, object value)
|
|
407
|
+
{
|
|
408
|
+
|
|
409
|
+
if (key == null || key.Length <= 0 || key.Length > 256)
|
|
410
|
+
{
|
|
411
|
+
TapLog.Log(key + " Property key length should be more then 0 and less than or equal to 256 characters.");
|
|
412
|
+
return false;
|
|
413
|
+
}
|
|
414
|
+
var maxLength = 4096;
|
|
415
|
+
if (key.Equals("device_id") || key.Equals("user_id"))
|
|
416
|
+
{
|
|
417
|
+
maxLength = 256;
|
|
418
|
+
}
|
|
419
|
+
if (value is string stringValue)
|
|
420
|
+
{
|
|
421
|
+
if (stringValue.Length > maxLength)
|
|
422
|
+
{
|
|
423
|
+
TapLog.Log(key + " Property value length should be less than or equal to " + maxLength + " characters.");
|
|
424
|
+
return false;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
return true;
|
|
428
|
+
}
|
|
429
|
+
|
|
418
430
|
}
|
|
419
431
|
}
|