mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
Heartbeat should link to AuthService directly instead of having a copy of the salt
This commit is contained in:
parent
012fa57346
commit
01fb28e998
@ -60,7 +60,7 @@ namespace MCGalaxy.Network
|
||||
"&name=" + Uri.EscapeDataString(name) +
|
||||
"&public=" + Server.Config.Public +
|
||||
"&version=7" +
|
||||
"&salt=" + Salt +
|
||||
"&salt=" + Auth.Salt +
|
||||
"&users=" + PlayerInfo.NonHiddenUniqueIPCount() +
|
||||
"&software=" + Uri.EscapeDataString(Server.SoftwareNameVersioned) +
|
||||
"&web=" + Server.Config.WebClient;
|
||||
|
@ -38,8 +38,9 @@ namespace MCGalaxy.Network
|
||||
|
||||
/// <summary> The URL this heartbeat is sent to </summary
|
||||
public string URL;
|
||||
/// <summary> Salt used for verifying player names </summary>
|
||||
public string Salt = "";
|
||||
/// <summary> Authentication service potentially associated with the heartbeat </summary>
|
||||
/// <example> ClassiCube beats use the Salt of the service for name authentication </example>
|
||||
public AuthService Auth;
|
||||
|
||||
public string GetHost() {
|
||||
try {
|
||||
@ -130,7 +131,7 @@ namespace MCGalaxy.Network
|
||||
AuthService service = AuthService.GetOrCreate(url);
|
||||
|
||||
Heartbeat beat = new ClassiCubeBeat() { URL = url };
|
||||
beat.Salt = service.Salt; // TODO: Just reference Service instead of copying salt?
|
||||
beat.Auth = service;
|
||||
Register(beat);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user