Allow access to unvalidated authstrings (bug 5587, r=psychonic).
This commit is contained in:
@@ -534,8 +534,8 @@ public ParamCheck(client)
|
||||
}
|
||||
case SteamId:
|
||||
{
|
||||
GetClientAuthString(i, infoBuffer, sizeof(infoBuffer));
|
||||
AddMenuItem(itemMenu, infoBuffer, nameBuffer);
|
||||
if (GetClientAuthString(i, infoBuffer, sizeof(infoBuffer)))
|
||||
AddMenuItem(itemMenu, infoBuffer, nameBuffer);
|
||||
}
|
||||
case IpAddress:
|
||||
{
|
||||
|
||||
@@ -49,8 +49,7 @@ PrepareBan(client, target, time, const String:reason[])
|
||||
return;
|
||||
}
|
||||
|
||||
decl String:authid[64], String:name[32];
|
||||
GetClientAuthString(target, authid, sizeof(authid));
|
||||
new String:name[32];
|
||||
GetClientName(target, name, sizeof(name));
|
||||
|
||||
if (!time)
|
||||
|
||||
@@ -37,7 +37,6 @@ DisplayVoteBanMenu(client, target)
|
||||
g_voteClient[VOTE_USERID] = GetClientUserId(target);
|
||||
|
||||
GetClientName(target, g_voteInfo[VOTE_NAME], sizeof(g_voteInfo[]));
|
||||
GetClientAuthString(target, g_voteInfo[VOTE_AUTHID], sizeof(g_voteInfo[]));
|
||||
GetClientIP(target, g_voteInfo[VOTE_IP], sizeof(g_voteInfo[]));
|
||||
|
||||
LogAction(client, target, "\"%L\" initiated a ban vote against \"%L\"", client, target);
|
||||
|
||||
@@ -261,10 +261,13 @@ native bool:GetClientIP(client, String:ip[], maxlen, bool:remport=true);
|
||||
* @param client Player index.
|
||||
* @param auth Buffer to store the client's auth string.
|
||||
* @param maxlen Maximum length of string buffer (includes NULL terminator).
|
||||
* @param validate Check backend validation status.
|
||||
* DO NOT PASS FALSE UNLESS YOU UNDERSTAND THE CONSEQUENCES,
|
||||
* You WILL KNOW if you need to use this, MOST WILL NOT.
|
||||
* @return True on success, false otherwise.
|
||||
* @error If the client is not connected or the index is invalid.
|
||||
*/
|
||||
native bool:GetClientAuthString(client, String:auth[], maxlen);
|
||||
native bool:GetClientAuthString(client, String:auth[], maxlen, bool:validate=true);
|
||||
|
||||
/**
|
||||
* Retrieves a client's user id, which is an index incremented for every client
|
||||
|
||||
Reference in New Issue
Block a user