Read hashes are now converted to uppercase when checked to preserve computability with php's sha512 hashing.
This commit is contained in:
parent
01c90dd269
commit
34d39bd8d3
2 changed files with 12 additions and 2 deletions
|
|
@ -15,6 +15,13 @@ GNU General Public License for more details.
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/* TShock wouldn't be possible without:
|
||||
* Github
|
||||
* Dreamspark
|
||||
* Microsoft Visual Studio 2010
|
||||
* HostPenda
|
||||
* And you, for your continued support and devotion to the evolution of TShock
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
|
@ -302,7 +309,7 @@ namespace TShockAPI
|
|||
|
||||
string encrPass = Tools.HashPassword(args.Parameters[1]);
|
||||
string[] exr = Tools.FetchHashedPasswordAndGroup(args.Parameters[0]);
|
||||
if (exr[0] == encrPass)
|
||||
if (exr[0].ToUpper() == encrPass.ToUpper())
|
||||
{
|
||||
args.Player.Group = Tools.GetGroup(exr[1]);
|
||||
args.Player.SendMessage("Authenticated as " + args.Parameters[0] + " successfully.", Color.LimeGreen);
|
||||
|
|
|
|||
|
|
@ -279,6 +279,9 @@ namespace TShockAPI
|
|||
handler.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!FileTools.OnWhitelist(player.IP))
|
||||
{
|
||||
Tools.ForceKick(player, "Not on whitelist.");
|
||||
|
|
@ -551,7 +554,7 @@ namespace TShockAPI
|
|||
|
||||
private void OnSaveWorld(bool resettime, HandledEventArgs e)
|
||||
{
|
||||
Tools.Broadcast("Saving world, might lag.", Color.Red);
|
||||
Tools.Broadcast("Saving world. Momentary lag might result from this.", Color.Red);
|
||||
Thread SaveWorld = new Thread(Tools.SaveWorld);
|
||||
SaveWorld.Start();
|
||||
e.Handled = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue