Commit graph

21 commits

Author SHA1 Message Date
Ty Conner
66d3b98339
Add options for database logging (#4352) 2025-08-23 13:32:35 -04:00
Galli
ecd6ce2b43
Remove UTF-8 BOMs across repository (#4324)
* remove bom from source files

* Remove stray BOM cleanup comments
2025-06-22 15:33:36 -04:00
Ty Conner
74cce13847
Cache ServerVersion.AutoDetect (#4256)
* Cache ServerVersion.AutoDetect

Adjusted database connections so that they cache ServerVersion.AutoDetect result on first hit and reuse.

This resolves a current bug that exhausts or times out connections to database.

* Change to dictionary

* Update Source/ACE.Database/DatabaseManager.cs

Co-authored-by: gmriggs <gmriggs@gmail.com>

* Update DatabaseManager.cs

* Update DatabaseManager.cs

---------

Co-authored-by: gmriggs <gmriggs@gmail.com>
2024-12-18 12:17:00 -05:00
Mag-nus
31d4437baf
Efnet8 (#4182)
* Update packages and notes

* Update package

* Scaffold
2024-07-17 00:03:33 -04:00
Ty Conner
36557921aa
Update AccountExtensions.cs (#4173) 2024-05-11 23:24:59 -04:00
Mag-nus
9d70b48380
Improve logging overhead by fixing string interpolation (#4107)
* First batch

* Second batch

* another batch

* last batch hopefully

* fix
2024-03-13 02:38:39 +00:00
Ty Conner
9a13f7ff9e
Adjust connection options for SQL servers (#4027)
Refactored to a non-user configurable string reference, shared across all connection paths

Added AllowUserVariables=True to fix bug introduced as a result of switching to MySqlConnector
2023-07-20 02:05:18 -04:00
Ty Conner
0c0ca9c7a4
Update to .NET6 (#3739)
* Update to .NET6

* Update dockerfiles to NET6

* Update appveyor.yml

* Update ACE.DatLoader.csproj

* Update Program_Setup.cs

* Update Program_DbUpdates.cs

* Update Program_DbUpdates.cs

* Update ACE.DatLoader.Tests.csproj

* Update ACE.Database.Tests.csproj

* Update ACE.Database.csproj

* Update ACE.Server.Tests.csproj

* Update ACE.Server.csproj

* Update ACE.DatLoader.csproj

* Update ACE.Database.csproj

* Update ACE.Server.csproj

* Update EF packages to EFCore 6

Requires Database, Database.Tests and Adapater to target .NET6 framework

* Update ACE.Server.csproj

* Update ACE.Database.csproj

* Update Program_BinUpdates.cs

* Update AccountExtensions.cs

* update nugets

* Remove TimeZoneConverter

net6 includes built in functionality

* update csproj files

* Update ACE.Server.csproj
2022-07-13 12:30:32 -04:00
Ty Conner
00b14af0e2
Add AllowPublicKeyRetrieval to SQL connections (#3871) 2022-07-04 13:04:05 -04:00
Ty Conner
71cc24f3ec
Add SslMode to SQL connection strings (#3863)
* Update AuthDbContext.cs

* Update ShardDbContext.cs

* Update WorldDbContext.cs

* Update Program_DbUpdates.cs
2022-07-02 12:13:37 -04:00
Mag-nus
d0b75cc69a
Update EF Nuget Packages (#3750)
* Update EF Nuget Packages

This requires ACE.Adapter and ACE.Database to be updated from .net standard 2.0 to 2.1

* Update ACE.Database.csproj

* fix merge
2021-12-01 10:13:52 -06:00
Mag-nus
43c9300b10
.NET Entity Framework Core 3.1 support (attempt #2) (#3356)
* packages updated, fix compiler errors/warnings

* scaffold

* fix ShardDatabaseOfflineTools

* WorldDatabase fix performance

* ShardDatabase fix GetCharacters

* move comment

stuff

* extend UseMySQL statements

* fix character creation linq parsing

* fix exception

* fix references
2020-12-07 20:59:40 -06:00
Mag-nus
d052089247
Misc Database Improvements/Cleanup (#3357)
* Add Resilient connections

* remove some comments

* Tracking Improvements

* Spelling fix

* Create global.json

Co-authored-by: Ty Conner <tyconner@itcproductions.com>
2020-11-15 13:07:15 -06:00
Ty Conner
f862d12a9c
Add support for account bans (#2917)
* Add support for account bans

* Update SentinelCommands.cs

* Update AdminCommands.cs

* Update SentinelCommands.cs

* Update SentinelCommands.cs

* Update SentinelCommands.cs

* Update SentinelCommands.cs
2020-04-12 18:47:17 -04:00
Ty Conner
3fc219e811
Add Creation/LastLogin IP/DateTime (#1985)
* Create 2019-06-10-00-Add_Fields_To_Account_Table.sql

* Scaffold new Account fields

* Add support for Create/LastLogin IP/DateTime

* Add CreateTime, CreateIP, LastLoginTime, LastLoginIp to finger output

* Update 2019-06-10-00-Add_Fields_To_Account_Table.sql

* update scaffolding

* changes as discussed

* BannedByAccountId

* sql changes as discussed

* update output

* Update AdminCommands.cs

* Update changelog.md
2019-07-06 16:12:24 -05:00
Ty Conner
d311df7e0c
Change BCrypt WorkFactor to configurable Option in Config.js (#1506)
* Change WorkFactor to 8

* Add configuration option for password workfactor, and migration option to support [up/down]grade at runtime

* Fix a default

* Do not pass in values less 4 and greater than 31 to prevent server crash

* Update defaults
2019-03-09 19:52:04 -06:00
zegegerslittlesis
cac4ea9e16 Update account authentication to use BCrypt. (#1468)
* Update account authentication to use BCrypt.

This updates account authentication to use the BCrypt hashing algorithm in place of SHA512 and the need for a separate password salt.

Bcrypt is also more secure since it uses a "Work Factor" to discourage password brute force attacks and the implementaition is much cleaner overall since the salt is randomly generated and added as part of the password hash itself, effectively protecting against rainbow table attacks.

The default WorkFactor is set to 10 which is the considered the current industry standard. A server owner can easily increase this value to whatever level of security they desire which in turn will make password verification slower and much harder to crack if ever brute forced by a hacker.

Furthermore, BCrypt is used in PHP's passwordHash() function so this change will open up some more account management possibilities through PHP registration scripts, especially CMS's and database bridging.

* Update AuthDbContext.cs

* Add Update script for Auth database

* Update Account / AuthDb for in-place migrations

* Fix a whitespace error

* Add 'passwd' and 'set-accountpassword' commands

* Update changelog

* Update AuthenticationBase.sql

Revert Auth Base to previous commit

* Update changelog.md
2019-03-08 13:41:23 -06:00
Mag-nus
616feed958
Assembly changes (#1369)
* Change child assemblies to AnyCPU. Ace.Server still x64

* Fix LifestonedConverter for > ushort.MaxValue weenies

* Allow DbContexts to be configured/used by other applications

* Make GetWeenie public

* SQLWriters should take IDictionary, not Dictionary

* Include links

* Keep tests as x64
2019-01-26 10:09:13 -06:00
Ty Conner
e813990318
Change Enchantment Registry to use a composite key (#1202)
* Change Enchantment Registry to use composite key instead of a primary key id column

* Add a few indexes

* Remove indexes added in #1206

* Rescaffold

* Switch EnableSensitiveDataLogging in AuthDbContext to a specific EFAUTHDEBUG variable

* Update changelog.md
2019-01-03 10:53:29 -06:00
Mag-nus
9c2a39946d
All 3 databases rescaffolded (#915)
* AuthDbContext rescaffolded

* WorldDbContext rescaffolded

* ShardDbContext rescaffolded
2018-08-01 09:05:21 -05:00
Mag-nus
a162905b1c WIP: Switch Database system to Entity Framework Core, DB First (#633)
* AuthenticationDatabase switched to Entity Framework Core, DB First

* Adds AsNoTracking() for performance and implements CreateAccount() instead of AddAccount()

* woops

* Auth db no longer needs to be init, or inherit from Database

* test fix hopefully

* Database objects in ACE.Entity would no longer be required

* Major WIP

* more progress

* AuthenticationDatabase switched to Entity Framework Core, DB First

* Adds AsNoTracking() for performance and implements CreateAccount() instead of AddAccount()

* woops

* Auth db no longer needs to be init, or inherit from Database

* test fix hopefully

* Database objects in ACE.Entity would no longer be required

* Major WIP

* more progress

* include missing CharacterCreateInfo

* GetCharacters changes to show how we can use the propertybag for these values

* Lot of progress with the WorldObject code

* comment add

* add biota to CreateWorldObject for loading inv from db
2018-03-06 04:35:48 -05:00