mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
fix invalid geetest url crash
This commit is contained in:
@@ -22,13 +22,13 @@ internal sealed partial class HomaGeetestClient
|
||||
{
|
||||
string template = appOptions.GeetestCustomCompositeUrl;
|
||||
|
||||
if (string.IsNullOrEmpty(template))
|
||||
if (string.IsNullOrEmpty(template) || !Uri.TryCreate(template.Format(gt, challenge), UriKind.Absolute, out Uri? uri))
|
||||
{
|
||||
return GeetestResponse.InternalFailure;
|
||||
}
|
||||
|
||||
HttpRequestMessageBuilder builder = httpRequestMessageBuilderFactory.Create()
|
||||
.SetRequestUri(template.Format(gt, challenge))
|
||||
.SetRequestUri(uri)
|
||||
.Get();
|
||||
|
||||
GeetestResponse? resp = await builder
|
||||
|
||||
Reference in New Issue
Block a user