Skip to content

Commit 7b03075

Browse files
committed
[Milky] Fixed the issue of signature verification failure during login.
1 parent 9970c03 commit 7b03075

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Lagrange.Milky/Utility/Signer.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public sealed class Signer : BotSignProvider, IDisposable
3535
private readonly string _url;
3636
private readonly HttpClient _client;
3737

38+
private readonly long _uin;
3839
private readonly string? _token;
3940

4041
public Signer(ILogger<Signer> logger, IOptions<CoreConfiguration> options)
@@ -53,6 +54,7 @@ public Signer(ILogger<Signer> logger, IOptions<CoreConfiguration> options)
5354
},
5455
});
5556

57+
_uin = options.Value.Login.Uin ?? 0;
5658
_token = signerConfiguration.Token;
5759
}
5860

@@ -72,7 +74,7 @@ public Signer(ILogger<Signer> logger, IOptions<CoreConfiguration> options)
7274
request.Content = new StringContent(
7375
JsonUtility.Serialize(new SecSignRequest
7476
{
75-
Uin = uin,
77+
Uin = uin == 0 ? _uin : uin,
7678
Command = cmd,
7779
Sequence = seq,
7880
Body = Convert.ToHexString(body.Span).ToLower(),

0 commit comments

Comments
 (0)