Some small rest improvements. Use newest TServer binary.
This commit is contained in:
parent
dd05c524ec
commit
225668fcdd
4 changed files with 8 additions and 6 deletions
|
|
@ -300,8 +300,8 @@ namespace TShockAPI
|
|||
return RestMissingParam("user");
|
||||
|
||||
var group = parameters["group"];
|
||||
if (string.IsNullOrWhiteSpace(group))
|
||||
return RestMissingParam("group");
|
||||
if (string.IsNullOrWhiteSpace(group))
|
||||
group = TShock.Config.DefaultRegistrationGroupName;
|
||||
|
||||
var password = parameters["password"];
|
||||
if (string.IsNullOrWhiteSpace(password))
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace Rests
|
|||
}
|
||||
|
||||
// TODO: Get rid of this when the old REST permission model is removed.
|
||||
if (!TShock.Config.RestUseNewPermissionModel)
|
||||
if (TShock.Config.RestApiEnabled && !TShock.Config.RestUseNewPermissionModel)
|
||||
{
|
||||
string warningMessage = string.Concat(
|
||||
"You're using the old REST permission model which is highly vulnerable in matter of security. ",
|
||||
|
|
@ -67,7 +67,7 @@ namespace Rests
|
|||
Console.WriteLine(warningMessage);
|
||||
Console.ForegroundColor = ConsoleColor.Gray;
|
||||
}
|
||||
else
|
||||
else if (TShock.Config.RestApiEnabled)
|
||||
{
|
||||
string warningMessage = string.Concat(
|
||||
"You're using the new more secure REST permission model which can lead to compatibility problems ",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue