mirror of
https://github.com/openbullet/openbullet.git
synced 2023-10-21 07:33:42 -05:00
Fixed cookie domain cannot be an empty string bug in CF Bypass Block.
This commit is contained in:
@@ -84,6 +84,7 @@ namespace RuriLib
|
||||
}
|
||||
|
||||
var localUrl = ReplaceValues(url, data);
|
||||
var uri = new Uri(localUrl);
|
||||
|
||||
var timeout = data.GlobalSettings.General.RequestTimeout * 1000;
|
||||
|
||||
@@ -109,7 +110,7 @@ namespace RuriLib
|
||||
|
||||
CookieContainer cookies = new CookieContainer();
|
||||
foreach (var cookie in data.Cookies)
|
||||
cookies.Add(new Cookie(cookie.Key, cookie.Value));
|
||||
cookies.Add(new Cookie(cookie.Key, cookie.Value, "/", uri.Host));
|
||||
|
||||
if (data.UseProxies)
|
||||
{
|
||||
@@ -148,8 +149,6 @@ namespace RuriLib
|
||||
httpClient.Timeout = TimeSpan.FromMinutes(timeout);
|
||||
httpClient.DefaultRequestHeaders.Add("User-Agent", ReplaceValues(userAgent, data));
|
||||
|
||||
var uri = new Uri(localUrl);
|
||||
|
||||
// Solve the CF challenge
|
||||
var result = cf.Solve(httpClient, handler, uri).Result;
|
||||
if (result.Success)
|
||||
|
||||
Reference in New Issue
Block a user