Skip to content

Commit edbc952

Browse files
authored
Merge pull request #37 from CyberSource/may-22-release
May 22 release
2 parents c303f1d + 409884b commit edbc952

File tree

124 files changed

+2478
-191
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+2478
-191
lines changed

cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/AuthenticationSdk.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>netstandard2.1</TargetFramework>
55
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
6-
<Version>0.0.1.6</Version>
6+
<Version>0.0.1.7</Version>
77
<Authors>CyberSource</Authors>
88
<Product>Authentication_SDK</Product>
99
<Description />

cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/LogUtility.cs

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ namespace AuthenticationSdk.util
88
{
99
public class LogUtility
1010
{
11-
private Dictionary<string, string> sensitiveTags;
12-
private Dictionary<string, string> authenticationTags;
11+
private static Dictionary<string, string> sensitiveTags = new Dictionary<string, string>();
12+
private static Dictionary<string, string> authenticationTags = new Dictionary<string, string>();
1313

1414
public LogUtility()
1515
{
16-
sensitiveTags = new Dictionary<string, string>();
17-
authenticationTags = new Dictionary<string, string>();
16+
if (!loaded)
17+
{
18+
LoadSensitiveDataConfiguration();
19+
}
1820
}
1921

2022
/// <summary>
@@ -31,11 +33,6 @@ private void LoadSensitiveDataConfiguration()
3133
{
3234
lock(mutex)
3335
{
34-
if (loaded)
35-
{
36-
return;
37-
}
38-
3936
sensitiveTags.Clear();
4037
authenticationTags.Clear();
4138

@@ -48,8 +45,6 @@ private void LoadSensitiveDataConfiguration()
4845

4946
public string MaskSensitiveData(string str)
5047
{
51-
LoadSensitiveDataConfiguration();
52-
5348
try
5449
{
5550
foreach (KeyValuePair<string, string> tag in sensitiveTags)

cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/SensitiveDataConfigurationType.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,21 @@ public class SensitiveDataConfigurationType
66
public static SensitiveTag[] sensitiveTags = new SensitiveTag[]
77
{
88
new SensitiveTag("securityCode", "[0-9]{3,4}", "xxxxx", false),
9-
new SensitiveTag("number", "(\\p{N}+)(\\p{N}{4})", "xxxxx$2", false),
10-
new SensitiveTag("cardNumber", "(\\p{N}+)(\\p{N}{4})", "xxxxx$2", false),
9+
new SensitiveTag("number", "(\\s*\\p{N}\\s*)+(\\p{N}{4})(\\s*)", "xxxxx$2", false),
10+
new SensitiveTag("cardNumber", "(\\s*\\p{N}\\s*)+(\\p{N}{4})(\\s*)", "xxxxx$2", false),
1111
new SensitiveTag("expirationMonth", "[0-1][0-9]", "xxxx", false),
1212
new SensitiveTag("expirationYear", "2[0-9][0-9][0-9]", "xxxx", false),
13-
new SensitiveTag("account", "(\\p{N}+)(\\p{N}{4})", "xxxxx$2", false),
13+
new SensitiveTag("account", "(\\s*\\p{N}\\s*)+(\\p{N}{4})(\\s*)", "xxxxx$2", false),
1414
new SensitiveTag("routingNumber", "[0-9]+", "xxxxx", false),
1515
new SensitiveTag("email", "[a-z0-9!#$%&'*+\\/=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+\\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", "xxxxx", false),
1616
new SensitiveTag("firstName", "([a-zA-Z]+( )?[a-zA-Z]*'?-?[a-zA-Z]*( )?([a-zA-Z]*)?)", "xxxxx", false),
1717
new SensitiveTag("lastName", "([a-zA-Z]+( )?[a-zA-Z]*'?-?[a-zA-Z]*( )?([a-zA-Z]*)?)", "xxxxx", false),
1818
new SensitiveTag("phoneNumber", "(\\+[0-9]{1,2} )?\\(?[0-9]{3}\\)?[ .-]?[0-9]{3}[ .-]?[0-9]{4}", "xxxxx", false),
1919
new SensitiveTag("type", "[-A-Za-z0-9 ]+", "xxxxx", false),
2020
new SensitiveTag("token", "[-.A-Za-z0-9 ]+", "xxxxx", false),
21-
new SensitiveTag("signature", "[-.A-Za-z0-9 ]+", "xxxxx", false)
21+
new SensitiveTag("signature", "[-.A-Za-z0-9 ]+", "xxxxx", false),
22+
new SensitiveTag("prefix", "(\\s*)(\\p{N}{4})(\\s*)(\\p{N}{2})(\\s*\\p{N}*\\s*)", "$2$4xxxxx", false),
23+
new SensitiveTag("bin", "(\\s*)(\\p{N}{4})(\\s*)(\\p{N}{2})(\\s*\\p{N}*\\s*)", "$2$4xxxxx", false)
2224
};
2325

2426
public static AuthenticationSchemeTag[] authenticationTags = new AuthenticationSchemeTag[]

cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.Test/Model/PtsV2PaymentsPost201ResponsePaymentAccountInformationCardTests.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,14 @@ public void PrefixTest()
104104
{
105105
// TODO unit test for the property 'Prefix'
106106
}
107+
/// <summary>
108+
/// Test the property 'HashedNumber'
109+
/// </summary>
110+
[Test]
111+
public void HashedNumberTest()
112+
{
113+
// TODO unit test for the property 'HashedNumber'
114+
}
107115

108116
}
109117

cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.Test/Model/PtsV2PaymentsPost201ResponseProcessorInformationMerchantAdviceTests.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ public void CodeRawTest()
8080
{
8181
// TODO unit test for the property 'CodeRaw'
8282
}
83+
/// <summary>
84+
/// Test the property 'NameMatch'
85+
/// </summary>
86+
[Test]
87+
public void NameMatchTest()
88+
{
89+
// TODO unit test for the property 'NameMatch'
90+
}
8391

8492
}
8593

cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.Test/Model/Ptsv2paymentsMerchantInformationMerchantDescriptorTests.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,14 @@ public void UrlTest()
144144
{
145145
// TODO unit test for the property 'Url'
146146
}
147+
/// <summary>
148+
/// Test the property 'CountryOfOrigin'
149+
/// </summary>
150+
[Test]
151+
public void CountryOfOriginTest()
152+
{
153+
// TODO unit test for the property 'CountryOfOrigin'
154+
}
147155

148156
}
149157

cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.Test/Model/Ptsv2paymentsOrderInformationInvoiceDetailsTests.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,14 @@ public void CostCenterTest()
192192
{
193193
// TODO unit test for the property 'CostCenter'
194194
}
195+
/// <summary>
196+
/// Test the property 'IssuerMessage'
197+
/// </summary>
198+
[Test]
199+
public void IssuerMessageTest()
200+
{
201+
// TODO unit test for the property 'IssuerMessage'
202+
}
195203

196204
}
197205

cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.Test/Model/Ptsv2paymentsOrderInformationTests.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,14 @@ public void ReturnsAcceptedTest()
121121
// TODO unit test for the property 'ReturnsAccepted'
122122
}
123123
/// <summary>
124+
/// Test the property 'IsCryptocurrencyPurchase'
125+
/// </summary>
126+
[Test]
127+
public void IsCryptocurrencyPurchaseTest()
128+
{
129+
// TODO unit test for the property 'IsCryptocurrencyPurchase'
130+
}
131+
/// <summary>
124132
/// Test the property 'PreOrder'
125133
/// </summary>
126134
[Test]

cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.Test/Model/Ptsv2paymentsPointOfSaleInformationEmvTests.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,14 @@ public void FallbackConditionTest()
104104
{
105105
// TODO unit test for the property 'FallbackCondition'
106106
}
107+
/// <summary>
108+
/// Test the property 'IsRepeat'
109+
/// </summary>
110+
[Test]
111+
public void IsRepeatTest()
112+
{
113+
// TODO unit test for the property 'IsRepeat'
114+
}
107115

108116
}
109117

cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.Test/Model/Ptsv2paymentsPointOfSaleInformationTests.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,14 @@ public void TerminalMakeTest()
272272
{
273273
// TODO unit test for the property 'TerminalMake'
274274
}
275+
/// <summary>
276+
/// Test the property 'ServiceCode'
277+
/// </summary>
278+
[Test]
279+
public void ServiceCodeTest()
280+
{
281+
// TODO unit test for the property 'ServiceCode'
282+
}
275283

276284
}
277285

0 commit comments

Comments
 (0)