Conversation
Every version, schema level and ConfVersion is now set in one file and compiled into one translation unit. - cmake/Revision.cmake is the only place a version is set: product version, REVISION_NR, the required realmd/character/world schema and every ConfVersion. It also probes git, and replaces MangosParams.cmake, GenRevision.cmake, EnsureVersion.cmake (unused) and src/genrev/. - cmake/BuildRevision.h.in is generated into <build>/revision/ only and included by src/shared/Common/Revision.cpp alone, which implements the Revision.h API. A commit or a version bump recompiles that one file. - Revision.h replaces GitRevision.h and SystemConfig.h: about 40 getters become about 15, the DB levels a DbVersion struct, and the config files one table (name, path, ConfVersion). - Removed revision_data.h.in, SystemConfig.h.in, GitRevision.*, the unused revision_data.h include in 35 Player*.cpp, and DatabaseVersionTest, which re-hard-coded the schema numbers. - realmd, Eluna and SD3 are submodules that must not be edited and still include GitRevision.h, SystemConfig.h and revision_data.h by name; forwarders for them live in src/shared/Compat/revision/. - Every *.conf.dist goes through mangos_install_conf(), and mangos_configure() refuses a template naming an unset @var@. aiplayerbot.conf takes its ConfVersion from Revision.cmake and is no longer generated and installed twice. - Fixed: three writers of the same revision header; the build-time refresh writing an empty host version under `cmake -P`; the extractor depending on a target that never existed and shipping file version 0.0.0 (it now uses VersionInfo.h like mangosd and realmd). - `.server info` prints "Compiled on", which is what the value always was. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mangosd refused to start unless OpenSSL's legacy provider module (ossl-modules/legacy.dll) could be loaded, and it needed that provider only for EVP_rc4() in the ARC4 class. No production code in this core uses ARC4: the vanilla header cipher is AuthCrypt's own, and Warden carries its own RC4 (WardenCryptoContext). - Removed ARC4.*, OpenSSLProvider.*, OpenSSLProviderTest and the ARC4 vector in CryptoStressTest. Warden's RC4 keeps its own tests. - mangosd: removed the provider start-up check and the dead pre-3.0 SSLeay branch. OpenSSL 3.x is the baseline enforced by CMake. - tests: no legacy.dll copy, no ossl-modules, no OPENSSL_MODULES. Windows CI no longer exports OPENSSL_MODULES. - CheckBuildPolicy: the "provider failure returns 1" rule matched nothing any more; it now fails if mangosd reaches for OpenSSLProvider again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Warden.Enabled (2015, later Warden.WinEnabled / Warden.OSXEnabled) was removed in 7bf3435 (#475) with no replacement: EnforcementMode = 0 still provisions Warden, sends the module, runs checks and writes audit rows, and an out-of-range mode is normalized to 2 (kick and ban). - Warden.Enabled, default 1. With 0, admission takes the existing no-Warden path, the same one used when a client supplies no admission data: no WardenServer, no checks, no audit rows, no enforcement. Every Warden seam already treats a missing WardenServer as "nothing to do", and login was never gated on Warden. The session key is still cleansed when the admission data is dropped. - Read at admission, so a config reload affects new sessions only. A disabled Warden is logged at start-up. - mangosd.conf documents the key; ConfVersion bumped to 2026092400. - CheckWardenBoundary requires the default-on setting in WorldConfig and exactly one active Warden.Enabled = 1 in the distributed config. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 11 |
| Duplication | 2 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three independent commits. Each one builds and passes
cteston its own, so please review them one at a time.1. Single point of versioning:
cmake/Revision.cmake+RevisionAPIVersions used to be set in five places, and
revision_data.hhad three generators writing the same file. Now:cmake/Revision.cmakeholds the product version,REVISION_NR, the required realmd/character/world schema and everyConfVersion.Revision.cpponly. Before,GitRevision.hpulled the generated header into every file that wanted a version string.Revision.hreplacesGitRevision.handSystemConfig.h. About 40 getters become about 15, the DB levels become oneDbVersionstruct, and the config files one table (name, path,ConfVersion).MangosParams.cmake,GenRevision.cmake,EnsureVersion.cmake(unused),src/genrev/,revision_data.h.in,SystemConfig.h.in,GitRevision.*, the unusedrevision_data.hinclude in 35Player*.cpp, andDatabaseVersionTest(it re-hard-coded the schema numbers).GitRevision.h,SystemConfig.handrevision_data.hby name and must not be edited. Forwarders for them live insrc/shared/Compat/revision/and are visible to those targets only.*.conf.distgoes throughmangos_install_conf(), andmangos_configure()fails the configure if a template names an unset@VAR@.aiplayerbot.confgets itsConfVersionfromRevision.cmakeand is no longer generated and installed twice.cmake -PleavesCMAKE_HOST_SYSTEM_VERSIONunset.TARGET revision_data.h, which never existed, and shipped file version0.0.0. It now usesVersionInfo.hlike mangosd and realmd..server infoprints "Compiled on: …" instead of "Running on: …". The value always was the build host.2. Drop the OpenSSL legacy provider and the unused
ARC4classmangosd refused to start without
ossl-modules/legacy.dll, and it needed that provider only forEVP_rc4()inARC4. No production code usesARC4: the vanilla header cipher isAuthCrypt's own, and Warden has its own RC4 inWardenCryptoContext, which keeps its tests.ARC4.*,OpenSSLProvider.*,OpenSSLProviderTest, the ARC4 vector case inCryptoStressTest, the provider start-up check, and the dead pre-3.0SSLeaybranch.legacy.dllor setOPENSSL_MODULES.CheckBuildPolicynow fails if mangosd usesOpenSSLProvideragain.3. Restore the
Warden.Enabledmaster switchIt was removed in 7bf3435 (#475) with no replacement.
EnforcementMode = 0still provisions Warden, sends the module, runs checks and writes audit rows, and an out-of-range mode is normalized to2(kick and ban).Warden.Enabled = 1by default. With0, admission takes the existing no-Warden path, the one already used when a client supplies no admission data: noWardenServer, no checks, no audit rows, no enforcement. Every Warden code path already treats a missingWardenServeras a no-op, and login was never gated on Warden. The session key is still cleansed.mangosd.confConfVersiongoes to2026092400.CheckWardenBoundaryrequires the default-on setting in code and in the distributed config.Verification
Full build with
-DBUILD_TOOLS=1 -DBUILD_MANGOSD=1 -DBUILD_REALMD=1 -DSOAP=1 -DSCRIPT_LIB_ELUNA=1 -DSCRIPT_LIB_SD3=1 -DPLAYERBOTS=1 -DBUILD_AH_SERVICE=1 -DWITH_TESTS=1:ctestgreen apart from the 3 legacy-provider cases (the local OpenSSL ships nolegacy.dll; commit 2 removes them)ctest16/16ctest16/16ctest16/16ctest16/16ctest16/16CheckBuildPolicyandCheckWardenBoundarypass.BuildRevision.hexists only under<build>/revision/.Revision.cpphas that directory on its include path.cmake_minimum_requiredincmake -Pmode only. Without it, the build-time revision refresh failed on CMake 3.x, becauseIN_LISTneeds CMP0057. That path is checked with CMake 3.31 script mode. A Ninja + GCC/clang replica ofcore_linux_build.ymlis still running on the final commit; this PR's CI covers the same ground.🤖 Generated with Claude Code
This change is