Skip to content

Commit d2f41b6

Browse files
committed
Fixed online update
- Improved regular expression to get the neweset version online - Fixed accessing the update URL with TLS 1.2.
1 parent f4db70c commit d2f41b6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Logbert/MainForm.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public partial class MainForm : Form, ISearchable
7777
/// <summary>
7878
/// Defines the <see cref="Regex"/> to parse a release name from the GitHub API 3 JSON string.
7979
/// </summary>
80-
private const string RELEASE_VERSION_REGEX = "\"name\":\"([\\d\\.]+)\"";
80+
private const string RELEASE_VERSION_REGEX = "\"name\":[\\s]*\"([\\d\\.]+)\"";
8181

8282
#endregion
8383

@@ -615,6 +615,9 @@ protected override void OnLoad(EventArgs e)
615615

616616
if (Settings.Default.FrmMainCheckForUpdateOnStartup)
617617
{
618+
// Use the security protocol Tls12 for web requests to github.
619+
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
620+
618621
// Build the web request object for the online update check.
619622
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(LOGBERT_UPDATE_API);
620623

0 commit comments

Comments
 (0)