mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-02-08 07:29:03 +01:00
- upgraded to DevExpress 18.2
- hide VPID and APID columns for Panasonic (no data provided) - Samsung J lists could have a \0 character at the end of a unicode16 string, which caused "Copy to Excel" to truncate the text - Fixed new-version check to work with github (only supports TLS 1.2 and newer now, not SSL 3.0) - added pull-request with GB Sky reference channel list
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using System.Net;
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Threading;
|
||||
using ChanSort.Ui.Properties;
|
||||
using DevExpress.XtraEditors;
|
||||
@@ -7,7 +9,7 @@ namespace ChanSort.Ui
|
||||
{
|
||||
class UpdateCheck
|
||||
{
|
||||
private const string UpdateUrl = "http://github.com/PredatH0r/ChanSort/releases";
|
||||
private const string UpdateUrl = "https://github.com/PredatH0r/ChanSort/releases";
|
||||
private const string SearchString = "ChanSort_";
|
||||
|
||||
public static void CheckForNewVersion()
|
||||
@@ -31,11 +33,26 @@ namespace ChanSort.Ui
|
||||
private string GetLatestVersion()
|
||||
{
|
||||
string response;
|
||||
using (WebClient client = new WebClient())
|
||||
|
||||
var oldCallback = ServicePointManager.ServerCertificateValidationCallback;
|
||||
var oldProtocol = ServicePointManager.SecurityProtocol;
|
||||
try
|
||||
{
|
||||
client.Proxy = null; // prevent a 1min wait/timeout by a .NET bug
|
||||
response = client.DownloadString(UpdateUrl);
|
||||
//Change SSL checks so that all checks pass
|
||||
//ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
||||
using (WebClient client = new WebClient())
|
||||
{
|
||||
client.Proxy = null; // prevent a 1min wait/timeout by a .NET bug
|
||||
response = client.DownloadString(UpdateUrl);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
//ServicePointManager.ServerCertificateValidationCallback = oldCallback;
|
||||
ServicePointManager.SecurityProtocol = oldProtocol;
|
||||
}
|
||||
|
||||
int start = response.IndexOf(SearchString);
|
||||
if (start >= 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user