Skip to content

Commit 86c2542

Browse files
committed
Version 1.1.4
1 parent f4059cb commit 86c2542

16 files changed

+60
-61
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Backtrace Unity Release Notes
22

3+
## Version 1.1.4 - 27.08.2019
4+
- Added support for servies under proxy (removed backtrace.sp conditions)
5+
36
## Version 1.1.3 - 07.06.2019
47
- Removed error log when unity-plugin receive status code: 200 on attachment upload.
58

Editor/Menu/BacktraceClientConfigurationEditor.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ public class BacktraceClientConfigurationEditor : UnityEditor.Editor
1212
public const string LABEL_SERVER_URL = "Server Address";
1313
public const string LABEL_REPORT_PER_MIN = "Reports per minute";
1414
public const string LABEL_HANDLE_UNHANDLED_EXCEPTION = "Handle unhandled exceptions";
15+
public const string LABEL_IGNORE_SSL_VALIDATION = "Ignore SSL validation";
16+
1517

1618
private const string CONFIG_NAME = "backtrace_client_config";
1719

@@ -23,10 +25,11 @@ public override void OnInspectorGUI()
2325
settings.UpdateServerUrl();
2426
if (!settings.ValidateServerUrl())
2527
{
26-
EditorGUILayout.HelpBox("Please insert valid Backtrace server url!", MessageType.Error);
28+
EditorGUILayout.HelpBox("Detected different pattern of url. Please make sure its a valid Backtrace url!", MessageType.Warning);
2729
}
2830
settings.ReportPerMin = EditorGUILayout.IntField(LABEL_REPORT_PER_MIN, settings.ReportPerMin);
2931
settings.HandleUnhandledExceptions = EditorGUILayout.Toggle(LABEL_HANDLE_UNHANDLED_EXCEPTION, settings.HandleUnhandledExceptions);
32+
settings.IgnoreSslValidation = EditorGUILayout.Toggle(LABEL_IGNORE_SSL_VALIDATION, settings.IgnoreSslValidation);
3033
}
3134
}
3235

Editor/Menu/BacktraceConfigurationEditor.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public class BacktraceConfigurationEditor : UnityEditor.Editor
1212
public const string LABEL_REPORT_PER_MIN = "Reports per minute";
1313
public const string LABEL_HANDLE_UNHANDLED_EXCEPTION = "Handle unhandled exceptions";
1414
public const string LABEL_ENABLE_DATABASE = "Enable Database";
15+
public const string LABEL_IGNORE_SSL_VALIDATION = "Ignore SSL validation";
1516

1617
public const string LABEL_PATH = "Backtrace database path";
1718
public const string LABEL_AUTO_SEND_MODE = "Auto send mode";
@@ -36,10 +37,12 @@ public override void OnInspectorGUI()
3637

3738
EditorGUILayout.PropertyField(serializedObject.FindProperty("ReportPerMin"), new GUIContent(LABEL_REPORT_PER_MIN));
3839

39-
4040
SerializedProperty unhandledExceptions = serializedObject.FindProperty("HandleUnhandledExceptions");
4141
EditorGUILayout.PropertyField(unhandledExceptions, new GUIContent(LABEL_HANDLE_UNHANDLED_EXCEPTION));
4242

43+
SerializedProperty sslValidation = serializedObject.FindProperty("IgnoreSslValidation");
44+
EditorGUILayout.PropertyField(sslValidation, new GUIContent(LABEL_IGNORE_SSL_VALIDATION));
45+
4346
SerializedProperty enabled = serializedObject.FindProperty("Enabled");
4447
EditorGUILayout.PropertyField(enabled, new GUIContent(LABEL_ENABLE_DATABASE));
4548

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Backtrace-unity",
33
"displayName": "Backtrace-Unity",
4-
"version": "1.1.3",
4+
"version": "1.1.4",
55
"unity": "2017.1",
66
"description": "Backtrace's integration with Unity games allows customers to capture and report handled and unhandled Unity exceptions to their Backtrace instance, instantly offering the ability to prioritize and debug software errors.",
77
"keywords": [

src/BacktraceClient.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ public void Refresh()
139139
}
140140
BacktraceApi = new BacktraceApi(
141141
credentials: new BacktraceCredentials(Configuration.GetValidServerUrl()),
142-
reportPerMin: Convert.ToUInt32(Configuration.ReportPerMin));
142+
reportPerMin: Convert.ToUInt32(Configuration.ReportPerMin),
143+
ignoreSslValidation: Configuration.IgnoreSslValidation);
143144

144145
Database?.SetApi(BacktraceApi);
145146
}

src/JsonNet/obj.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/Model/BacktraceClientConfiguration.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ public class BacktraceClientConfiguration : ScriptableObject
99
public string ServerUrl;
1010
public int ReportPerMin;
1111
public bool HandleUnhandledExceptions = true;
12+
public bool IgnoreSslValidation = false;
1213

1314
public void UpdateServerUrl()
1415
{
@@ -35,7 +36,7 @@ public void UpdateServerUrl()
3536

3637
public bool ValidateServerUrl()
3738
{
38-
if (!ServerUrl.Contains(".sp.backtrace.io") && !ServerUrl.Contains("submit.backtrace.io"))
39+
if (!ServerUrl.Contains("backtrace.io") && !ServerUrl.Contains("submit.backtrace.io"))
3940
{
4041
return false;
4142
}

src/Model/BacktraceConfiguration.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ public class BacktraceConfiguration : ScriptableObject
2828
/// </summary>
2929
public bool HandleUnhandledExceptions = true;
3030

31+
/// <summary>
32+
/// Determine if client should ignore ssl validation
33+
/// </summary>
34+
public bool IgnoreSslValidation = false;
35+
3136
/// <summary>
3237
/// Directory path where reports and minidumps are stored
3338
/// </summary>

src/Model/BacktraceCredentials.cs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -51,28 +51,12 @@ public Uri GetSubmissionUrl()
5151
}
5252

5353
var uriBuilder = new UriBuilder(BacktraceHostUri);
54-
if (_validUrl)
55-
{
56-
return uriBuilder.Uri;
57-
}
58-
if (string.IsNullOrEmpty(Token))
59-
{
60-
throw new ArgumentException(nameof(Token));
61-
}
62-
6354
if (!uriBuilder.Scheme.StartsWith("http"))
6455
{
6556
uriBuilder.Scheme = $"https://{uriBuilder.Scheme}";
6657
}
67-
if (!uriBuilder.Path.EndsWith("/") && !string.IsNullOrEmpty(uriBuilder.Path))
68-
{
69-
uriBuilder.Path += "/";
70-
}
71-
uriBuilder.Path = $"{uriBuilder.Path}post";
72-
uriBuilder.Query = $"format=json&token={Token}";
7358
return uriBuilder.Uri;
7459
}
75-
private readonly bool _validUrl = false;
7660

7761
/// <summary>
7862
/// Initialize Backtrace credentials with Backtrace submit url.
@@ -95,11 +79,6 @@ public BacktraceCredentials(Uri backtraceSubmitUrl)
9579
{
9680
hostToCheck = $"www.{hostToCheck}";
9781
}
98-
_validUrl = hostToCheck.StartsWith("www.submit.backtrace.io") || hostToCheck.Contains("sp.backtrace.io");
99-
if (!_validUrl)
100-
{
101-
throw new ArgumentException(nameof(backtraceSubmitUrl));
102-
}
10382
_backtraceHostUri = backtraceSubmitUrl;
10483
}
10584

src/Model/BacktraceData.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public string ToJson()
117117
["lang"] = "csharp",
118118
["langVersion"] = "Unity",
119119
["agent"] = "backtrace-unity",
120-
["agentVersion"] = "1.1.3",
120+
["agentVersion"] = "1.1.4",
121121
["mainThread"] = MainThread,
122122
["classifiers"] = new JArray(Classifier),
123123
["attributes"] = Attributes.ToJson(),
@@ -163,7 +163,7 @@ private void SetReportInformation()
163163
Uuid = Report.Uuid;
164164
Timestamp = Report.Timestamp;
165165
LangVersion = "Mono/IL2CPP";
166-
AgentVersion = "1.1.3";
166+
AgentVersion = "1.1.4";
167167
Classifier = Report.ExceptionTypeReport ? new[] { Report.Classifier } : null;
168168
}
169169
}

0 commit comments

Comments
 (0)