Commit graph

324 commits

Author SHA1 Message Date
Lucas Nicodemus
342921b3ed Document Utils.cs & UserManager.cs
Deprecated Utils.Random()
2015-04-19 21:14:15 -06:00
Lucas Nicodemus
85661f3485 Move to "protected" only (thanks @MarioE!) 2015-04-14 08:16:11 -06:00
Lucas Nicodemus
c5034a23ad Turns out that OmniServer doesn't refactor after all, who knew? Fix build. 2015-04-13 23:31:38 -06:00
Lucas Nicodemus
b34c00107c "Brace" for impact with these Important changes
Apparently the convention is UpperCamel for private functions too.
Fixed a stray brace that caused people to brace for a sudden evisceration of limbs.
Use Int32.Parse instead of Convert.ToInt32, because Microsoft exposes public
APIs they say not to use. 👏
2015-04-13 23:24:37 -06:00
Lucas Nicodemus
136064f4b2 Fix formatting of old aglo block
Also spelled algorithms correctly
2015-04-13 14:57:58 -06:00
Lucas Nicodemus
493dc0c069 Change braces to use VS style 2015-04-13 14:49:04 -06:00
Lucas Nicodemus
12f893e0cb Require minimum password length of 4, and trim new passwords for whitespace.
Fixes problems reported by @MarioE and @Simon311:
- Users can no longer register with whitespace for a password.
- Users can no longer register with 4 whitespaces for a password.
2015-04-13 14:26:12 -06:00
Lucas Nicodemus
845c8c4b3d Change access modifiers to 'protected internal'
(this is what I meant anyway by internal, didn't realize internal
allowed any access in the assembly)
2015-04-13 13:06:49 -06:00
Lucas Nicodemus
1f690440d0 Change errors in BCrypt to be more clear for users to fix
Change doc verbiage to refer to what these actually do
2015-04-13 12:46:10 -06:00
Lucas Nicodemus
6cef3c6eb3 Add documentation for CreateBCryptHash 2015-04-13 12:35:25 -06:00
Lucas Nicodemus
e55c37728f Change config to refer to BCryptWorkFactor instead of WorkFactor.
Change default work factor to 7.
2015-04-13 11:33:04 -06:00
Lucas Nicodemus
08fae75c0c Fix string split in upgrade check so that it works 2015-04-13 11:31:13 -06:00
Lucas Nicodemus
37b5a52fdb Move all TShock usages to use User.VerifyPassword() 2015-04-13 11:16:21 -06:00
Lucas Nicodemus
bbf6fd2c86 UserManager insert does no passsword hashing
This should be fine, now, because User.CreateBCryptHash should take
care of this.
2015-04-13 10:58:22 -06:00
Lucas Nicodemus
ed34a87c3f Migrate some manual password creation to BCrypt
Note that several times, user.Password was set to a plain text password,
but then later changed to a hashed password, creating data inconsistency.

This also changes User.Password to private set to prevent further accidents.
2015-04-13 10:44:45 -06:00
Lucas Nicodemus
a5aa31376a Add password verification for BCrypt 2015-04-13 10:06:58 -06:00
Lucas Nicodemus
06becadc8d Document Warp() constructor 2015-04-13 01:03:13 -06:00
Lucas Nicodemus
417ffbc740 Updated XML documentation for several methods 2015-04-12 23:39:04 -06:00
Lucas Nicodemus
6c516e5f3d Add deprecation warning to string AddGroup(name, perms)
Can't remove the other AddGroup string method without a deprecation
window of 1 release for this stupid function too.
2015-04-12 22:12:08 -06:00
Lucas Nicodemus
da8ce502bc Add replacement for string AddGroup
Add deprecation warnings to previous methods
2015-03-11 09:10:40 -06:00
Lucas Nicodemus
03d817e0a2 Return more modern error in AddGroup 2015-03-11 09:00:14 -06:00
Lucas Nicodemus
caf3c662eb Fix more random tab/spaces in SqlTable.cs 2015-03-10 11:15:52 -06:00
Lucas Nicodemus
7187245879 Fix deprecation message fixes #880 2015-03-10 11:14:21 -06:00
Zack Piispanen
406abce30c Add hooks for Region creation/deletion. Add hooks for Region Enter/Leave. Add member to TSPlayer displaying current region. Set private setters in AccountHooks. 2015-03-01 22:27:49 -05:00
Lucas Nicodemus
2f0d407dec RegionManager now says "you must be logged in" 2015-02-28 21:19:27 -07:00
Lucas Nicodemus
d971db165c Remove several obsolete shims
No need to keep obsolete shims in for several versions of TShock
2015-02-28 20:15:56 -07:00
Lucas Nicodemus
1be5f6fdc2 Remove remaining obsolete references to Log vs TShock.Log 2015-02-28 19:42:26 -07:00
Lucas Nicodemus
cbce64f1eb Remove more obsolete code; fix tab/space screwup in TSPlayer 2015-02-28 19:37:06 -07:00
Lucas Nicodemus
6e0de64f18 Remove more broken/obsolete/dead code 2015-02-28 19:15:19 -07:00
Zack
17ea9e0875 Use the NetItem max inventory when seeding the database. 2015-02-22 17:14:57 -05:00
Lucas Nicodemus
d82851faf3 EnsureExists now calls EnsureTableStructure directly
It occurs to me that copypasting code is bad
2015-02-22 12:03:05 -07:00
Lucas Nicodemus
04145a4aca Re-add EnsureExists signature to fix compat with old plugins
Fixes #862
2015-02-22 08:43:12 -07:00
Lucas Nicodemus
12a39f4e9a Revert "Use Sublime Text's "Convert all open views to tabs" option"
This reverts commit b35a02d379.
2015-02-21 23:00:30 -07:00
Lucas Nicodemus
b35a02d379 Use Sublime Text's "Convert all open views to tabs" option 2015-02-21 22:57:14 -07:00
Lucas Nicodemus
6a41c34380 isn't this ruby 2015-02-21 22:53:56 -07:00
Lucas Nicodemus
817479ea70 Add Getuser calls to delete user 2015-02-21 22:51:38 -07:00
Lucas Nicodemus
91d5fab27d Add account create & delete hooks 2015-02-21 22:35:05 -07:00
Lucas Nicodemus
484ebd6d81 Do not auto-recreate the default groups on startup 2015-02-21 17:13:01 -07:00
Zack
f9bf470b1d Tick version and update copyright 2015-01-28 15:29:13 -05:00
Zack Piispanen
d5527ade42 Add length to database primary keys.
Tweak some of the itembans code to be less inefficient.
Removed a chunk of code from the buff code that prevented users from being buffed with a buff that comes from an item.  This code seemed to cause max cpu usage when being disabled.  I don't think this code is useful, but I leave that to people who own servers.  IMO all buff code should be removed.
2014-09-15 09:05:28 -04:00
Zack Piispanen
1421c23df7 Remove crappy spaces in this file. 2014-09-03 02:48:57 -04:00
Zack Piispanen
1c7fe908b6 Delete a bunch of cruft that has gone unmaintained for too long.
Fix warps to have an auto-increment primary key column, and unique on name/WorldID
Same for regions.
Changed SqliteTableCreator to do proper unique syntax.
2014-09-03 02:41:53 -04:00
Zack
7a8422de5c Add tile banning, because such whine, much desire (doge).
I am sure this will result in someone whining for wall banning as well, but that can wait another couple of months.
2014-07-27 20:57:17 -04:00
MarioE
eb8ffe5cfb Fix resizeRegion 2014-07-25 17:41:19 -04:00
Zack
fb451c6d49 Update license header for 2014 2014-07-10 21:48:33 -04:00
Zack
915e791406 Initial work to move all Server Side Character code to its own module. 2014-07-10 21:09:32 -04:00
MarioE
66b0f3899c Merge /tphere into /tp, add /tppos 2014-06-27 21:53:01 -04:00
White
3860f39a8b Inserts the right number of elements into tsCharacter, with fixed tabbing 2014-05-21 14:56:23 +09:30
AquaBlitz11
9dbcd59624 Fix word typo
Word is spelled correctly but in wrong order.
2014-05-16 18:06:42 +07:00
Zack Piispanen
0ea58cde3e Update SSC to include quests, skin color, eye color 2014-05-13 23:08:23 -04:00