TShock/TShockAPI
Lucas Nicodemus dd972a7f31 Warn users about odd password conditions
TShock was originally designed to handle many things that Terraria did
not. Therefore, TShock always "took over" for the server password
prompt. We then added the ability to login via the password prompt if
you had an account, so that you could play on a server and login without
having to run /login in the chat window. Then, UUIDs were introduced,
and we added the ability to login via UUID.

This has created a cascading scenario where users are potentially
affected by many different things. We have always treated a user's
runtime intent as the most important: if a user sets something on the
console, it should be taken as the "most true" setting. In other words,
we believe that the most recent choice the user made is the valid one.
But for some of the config settings we have, we've made it opaque as to
how this decision making works. We also aren't clear what certain things
do by default.

Currently, if UUID login is enabled, a user will login "magically" and
bypass any password prompt. Even if this is disabled, though, users are,
by default, allowed to enter their passwords at the password prompt
instead of the server password. Both of these take priority over the
runtime setting.

The problem is that we haven't really made it clear if we should
override the runtime setting here. This is because the Terraria
interactive prompt asks for a server password, and one of the two
"bypass" settings is not a password setting at all. What do we respect?

I decided that the best approach is to just communicate really loudly
about these settings. If a runtime password is set, we'll warn users if
either of the bypass settings are "in play." If it's not set, we'll warn
users if the server password was set in config.json, just so they know
which password is being used.

If UUID logins are enabled we'll also warn users about that and the
security risks attached, no matter what. I don't know that we should
really have this feature, but we shouldn't get rid of it, imho.

The only thing I don't think we need to warn about is if login before
join is enabled. Login before join just acts as a way to speed up logins
for registered users. In an ideal world, users who shouldn't be able to
login should be banned. But I split the difference since we're warning
about UUID logins.

The only real downside to this change is that the PostInit hook gets
bigger. But dumping this stuff in another file/area/etc., seems dumb
since some of the logic exists here already. I think we can refactor
this later, but it's not my most pressing priority.

This whole change was inspired by the fact that @Onusai tried to lock
down their server but failed because of these settings enabled. We need
to be more transparent about logins, and this is a good first step.
2021-05-25 22:49:01 -07:00
..
CLI Update copyright to 2019 again 2019-03-29 17:16:37 -07:00
Configuration Warn players if bypass SSC permission is enabled 2021-05-21 01:16:04 -07:00
DB Fix torchflags 2021-05-23 04:48:01 -07:00
Extensions Re-enable Int64 override for IDataReader.Get 2020-11-29 18:23:35 +10:30
Handlers Fix spaces lol 2021-05-21 13:54:40 +02:00
Hooks Implement handled pattern on the PlayerChat hook 2021-04-13 13:14:56 +09:30
Localization pass compile; add void vault code 2020-05-17 21:38:47 +08:00
Models Update GetDataHandler.HandleProjectileNew to include HasBannerIdToRespondTo 2021-04-05 10:45:41 +08:00
Net Address feedback from @hakusaro about style & documentation 2021-05-21 13:13:06 +02:00
Properties Version tick: 4.5.3 2021-05-22 10:54:47 -07:00
Rest Merge branch 'general-devel' into rest-permissions 2021-04-22 16:52:55 +09:30
Sockets pass compile; add void vault code 2020-05-17 21:38:47 +08:00
app.config Saving work to apply merge changes 2017-04-19 17:12:38 -06:00
BackupManager.cs Refactor for new configuration 2020-12-03 17:43:10 +10:30
Bouncer.cs fix typo 2021-05-12 12:35:15 -04:00
Commands.cs Add WorldInfo broadcast in /worldmode 2021-05-24 10:41:18 +02:00
ConfigFile.cs Automatically back up the world by default 2021-05-20 03:31:37 -07:00
FileTools.cs Update how it looks 2021-05-14 13:23:42 -04:00
GeoIPCountry.cs Update copyright to 2019 again 2019-03-29 17:16:37 -07:00
GetDataHandlers.cs Fix torchflags 2021-05-23 04:48:01 -07:00
Group.cs Refactor for new configuration 2020-12-03 17:43:10 +10:30
HandlerList.cs Update copyright to 2019 again 2019-03-29 17:16:37 -07:00
ILog.cs Overhaul debug logging 2020-05-19 22:04:10 -07:00
IPackable.cs Update copyright to 2019 again 2019-03-29 17:16:37 -07:00
ItemBans.cs Refactor for new configuration 2020-12-03 17:43:10 +10:30
NetItem.cs pass compile; add void vault code 2020-05-17 21:38:47 +08:00
packages.config Update to Newtonsoft JSON v10.0.3 for parity with OTAPI/TSAPI 2019-03-30 15:47:14 +10:30
PaginationTools.cs Update copyright to 2019 again 2019-03-29 17:16:37 -07:00
Permissions.cs Implement additional teleport permissions. 2021-05-11 14:17:36 -04:00
PlayerData.cs Change happyFunTorchTime from true to false 2021-05-23 17:11:06 -07:00
RegionHandler.cs Refactor for new configuration 2020-12-03 17:43:10 +10:30
Resources.Designer.cs Remove headers from autogenerated file 2016-10-17 11:28:34 +05:30
Resources.resx Remove 2 year old config files... 2013-10-01 20:55:19 -04:00
SaveManager.cs Refactor for new configuration 2020-12-03 17:43:10 +10:30
SqlLog.cs Refactor for new configuration 2020-12-03 17:43:10 +10:30
TextLog.cs Refactor for new configuration 2020-12-03 17:43:10 +10:30
TShock.cs Warn users about odd password conditions 2021-05-25 22:49:01 -07:00
TShockAPI.csproj Fix OTAPI reference 2021-04-11 21:00:28 +10:00
TShockAPI.licenseheader Update copyright to 2019 again 2019-03-29 17:16:37 -07:00
TSPlayer.cs Warn players if bypass SSC permission is enabled 2021-05-21 01:16:04 -07:00
TSServerPlayer.cs Ban rewrite and various other adjustments 2020-11-26 17:20:19 +10:30
UpdateManager.cs Update copyright to 2019 again 2019-03-29 17:16:37 -07:00
Utils.cs Refactor for new configuration 2020-12-03 17:43:10 +10:30
web.config Saving work to apply merge changes 2017-04-19 17:12:38 -06:00