238 Commits

Author SHA1 Message Date
Shauren
f94e341a03 Core/Bnet: Support password protected private keys 2023-07-26 20:59:15 +02:00
Shauren
8b426af763 Core/Bnet: Send hostnames in portal requests for launcherlogin 2023-07-20 00:38:07 +02:00
Shauren
6be536a73b Core/Network: Refactor local/remote ip address selection code and allow using hostnames in LoginREST bnetserver config options 2023-07-15 00:45:16 +02:00
Shauren
cdfaecda52 Core/Network: Cleanup asio using directives 2023-07-15 00:43:19 +02:00
Смердокрыл
74a4dc46b4 Core/Config: Implement reading config overrides from subdirectory (#29068)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
2023-06-09 20:36:03 +02:00
Shauren
3bd4c21754 Core/DataStores: Remove temporary 10.0.7 workraround 2023-05-05 00:45:11 +02:00
Shauren
d791afae1d Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api) 2023-01-08 21:16:53 +01:00
Shauren
8a183a6e5e Core/bnetserver: Implemented reconnecting with launcherlogin 2022-09-13 14:27:54 +02:00
Shauren
89652bd78f Core/bnetserver: Add compatibility for classic clients 2022-09-06 16:29:36 +02:00
Shauren
3fa46c6dc1 Core/Crypto: Fixed loading legacy openssl provider for RC4 on windows 2022-09-05 18:48:43 +02:00
Shauren
bc87f7b337 Core/Crypto: Switch away from most deprecated openssl functions and removed upper version limit 2022-05-03 17:03:57 +02:00
Anton Popovichenko
8447f627ba Core/Config: Implement config override with env vars (#26811)
* Core/Config: Implement config override with env vars

Implement overriding of configuration from the .conf file with environment variables.
Environment variables keys are autogenerated based on the keys defined in .conf file.
Usage example:
$ export TC_DATA_DIR=/usr
$ TC_WORLD_SERVER_PORT=8080 ./worldserver

* Core/Config Fix typo in logs

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>

* Core/Config Fix code style in EnvVarForIniKey

Co-authored-by: Shauren <shauren.trinity@gmail.com>

* Update tests/common/Config.cpp

* Apply suggestions from code review

Co-authored-by: Peter Keresztes Schmidt <carbenium@outlook.com>

* Apply suggestions from code review

Co-authored-by: Peter Keresztes Schmidt <carbenium@outlook.com>

Co-authored-by: Anton Popovichenko <anton.popovichenko@mendix.com>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
Co-authored-by: Shauren <shauren.trinity@gmail.com>
Co-authored-by: Peter Keresztes Schmidt <carbenium@outlook.com>
(cherry picked from commit 1ddd9dc19c)
2022-03-13 16:37:01 +01:00
Shauren
becc9ba1fc Core/Misc: Fix mac build 2022-03-12 18:35:59 +01:00
Giacomo Pozzoni
5afa32e9a7 Core/Network: Add option to allow/disallow saving IP addresses to database (#26723)
Add config option AllowLoggingIPAddressesInDatabase to authserver and worldserver to specify if IP addresses can be logged or not to the database

(cherry picked from commit 68bf7e6d12)
2022-03-11 20:50:36 +01:00
Shauren
439b027d48 Core/Misc: Cleanup unused includes 2022-02-13 15:07:00 +01:00
Treeston
e0e3bae82c Core/Authserver: Removal of sha_pass_hash, compatibility fields, and everything that uses them (PR #25156)
(cherry picked from commit bcdbdd6f23)
2022-02-05 13:29:21 +01:00
Shauren
473f3db0ab Core/CrashHandler: #ifdef cleanup to make VS not choke when parsing, fixed file being all red in editor
(cherry picked from commit 39c5e03b74)
2022-01-26 18:46:43 +01:00
Treeston
7603dacc64 Core/Authserver: Deprecation of sha_pass_hash (PR #25138)
see also #25157

(cherry picked from commit 44a3aad0af)
2022-01-26 16:21:43 +01:00
Shauren
c776218cb5 Core/Misc: Properly close database connections when using --update-databases-only arg
(cherry picked from commit a9f9f737b2)
2022-01-06 23:35:09 +01:00
ipriver
8979493bb7 Additional cmake entry for configs
Closes #24812

Co-authored-by: Carbenium <carbenium@outlook.com>
(cherry picked from commit dc467ee0f6)
2022-01-06 22:54:29 +01:00
myuzhobcplidtkieno
de5f7edede Added the ability to use TLS when connecting to a database. (#24348)
* Added the ability to use TLS when connecting to a database.

* Trying to kickstart CI checks

* Revert the kickstart change

Co-authored-by: myuzhobcplidtkieno <myuzhobcplidtkieno@github.com>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit ae553f8966)
2022-01-01 01:07:52 +01:00
Shauren
c5244d4e66 Core/Bnetserver: Added --update-databases-only console argument to bnetserver 2021-12-18 20:26:44 +01:00
Treeston
0b61c3b7b1 [3.3.5] Core/Authserver: TOTP rewrite: (PR #23633)
- Proper management commands (.account 2fa)
- Secrets can now be encrypted (set TOTPTokenSecret in .conf)
- Secret now stored in binary
- Argon2 and AES primitives
- Base32/64 support

(cherry picked from commit 4211645834)
2021-12-18 20:24:50 +01:00
Trond B. Krokli
001b9fb05c Core/conf: conf.dist typo & grammar corrections (#23190)
- Typo and spelling corrections
- Grammar corrections, English grammar
- Minor adjustments in example code readability
- Capitalization adjustments to keep consistency
  with existing idioms, phrases and concepts

(cherry picked from commit f9b1e4a032)
2021-12-02 00:37:00 +01:00
Shauren
193233286d Core/Misc: ASSERT() cleanup - followup of cherry pick 572eab1c35 2021-08-08 15:22:55 +02:00
Shauren
3c08eb190f Core/Misc: Add another boost hack. Fixes bnetserver/worldserver -c command line parameter when path contains spaces 2021-05-24 00:08:03 +02:00
Shauren
98939d258a Dep/Boost: Partial support for boost 1.74 - asio
Ref #25470

(cherry picked from commit 155e37831e)
2020-12-12 18:50:13 +01:00
Shauren
b231903932 Core/Misc: Port all the refactors sneaked in master to 3.3.5 include cleanup port 2020-09-04 13:38:24 +02:00
Treeston
73922d2a85 Core/Authserver: Re-organize the accounts table (PR #25135)
- no longer use sha_pass_hash for anything else core-side (.account, SOAP, RA)
- salt/verifier/session_key are now binary
- old s/v/sha_pass_hash fields kept around for backwards compatibility
- sha_pass_hash is still updated (for now), s/v are not
- sha_pass_hash is only read if s/v have been manually changed
- SRP6 b now uses the full 32 bytes of randomness (instead of randomly only using 19)

(cherry picked from commit 3164b58c7d)
2020-08-03 22:37:47 +02:00
Treeston
e9392ad287 Core/Authserver: Authserver cleanup (PR#25093)
- Fix a handful of 1/256 bugs with most significant byte zero in BigNumber
- Get rid of (most of) the C-style arrays in authserver
- CryptoRandom as a unified source for cryptographic randomness
- Bring our other crypto APIs into 2020
- BigNumber usability improvements
- Authserver is now actually readable as a result of all of the above

(cherry picked from commit 210176fd91)
2020-08-03 19:39:00 +02:00
Shauren
79cd94d26d Core/Misc: Changed GetLocaleByName to return invalid value on invalid input instead of LOCALE_enUS
* Also added IsValidLocale helper function
2020-06-30 00:22:25 +02:00
Peter Keresztes Schmidt
bab5fd87a3 Core/Misc: Replace Trinity::make_unique with std (#24869) 2020-06-23 08:54:12 +02:00
ForesterDev
01d098830a DB/Account: update account_access table (#24788)
* DB/Account: update account_access table:

- rename fields id -> AccountID, gmlevel -> SecurityLevel
- add Comment field
- rename command .acc set gmlevel to .acc set seclevel

* Update auth database

* Fix primary key

* Temporary restore old command account set gmlevel with same handler as account set seclevel

Use Optional  for realmID - if not set, use -1 (for all realms)

* Rename 2020_XX_XX_00_auth.sql to 2020_06_20_00_auth.sql

* Update auth_database.sql

* Rename 2020_XX_XX_00_world.sql to 2020_06_20_06_world.sql

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit 8e0365d8a6)
2020-06-22 11:03:31 +02:00
Shauren
13053538f2 Core/Battlenet: Add club services 2020-05-09 01:09:07 +02:00
Shauren
7272508cb4 Core: Fix clang 10 warnings 2020-04-26 01:25:50 +02:00
Shauren
0f0ca3a919 Core/DBLayer: Implement async transaction completion callbacks 2020-04-14 16:23:44 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
Shauren
f6e2b8cdc1 Core/DBLayer: Prevent committing transactions started on a different database 2019-07-27 10:52:33 +02:00
Shauren
e8e89f58fb Core/DBLayer: Prevent using prepared statements on wrong database 2019-07-27 01:00:37 +02:00
Shauren
3058d8c5ab Core/bnetserver: Fixed crash happening when sending packets larger than 4096 bytes 2019-07-21 16:32:49 +02:00
Shauren
bcda8dd742 Core/Dep: Boost 1.70 compatibility 2019-04-14 00:13:23 +02:00
Shauren
50cfeb9aa4 Core/Misc: Improved ip2location code and set it to disabled by default
(cherry picked from commit 0ead73516a)
2019-01-09 17:35:18 +01:00
Gooyeth
163c487be7 Common: Replace ip2nation by ip2location. (#21957)
Replace ip2nation by ip2location.

Download: https://lite.ip2location.com/database/ip-country
(cherry picked from commit 2fe4ab94c5)
2019-01-09 17:35:13 +01:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
Shauren
f94deace76 Merge branch 'bfa' 2018-12-09 14:45:03 +01:00
Shauren
31f0186d20 Core/Bnet: Updated protobuf messages and services 2018-11-05 17:41:37 +01:00
Shauren
41a7e08e43 Core/Bnet: Safeguard auth process against bad external db modifications 2018-10-22 19:06:26 +02:00
Roc13x
11c3c456b7 Core/Bnet: Improve client ban messages (#21837)
* Don't hide banned game accounts from list.
* Display proper ban messages with suspension time remaining.
* More appropriate error codes for bans and locks
2018-04-18 20:27:45 +03:00
Shauren
fe04f2388f Core/Bnet: Fixed crash that can happen when sending malformed requests 2018-01-21 19:04:14 +01:00
Shauren
dfd2660a85 Core/Misc: Added compatibility layer for boost 1.66 and future std:: networking stuff
* Based on work done by @dimiandre in PR #21173

Closes #21171
Closes #21173
2018-01-06 01:21:59 +01:00