Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

gameserver.cpp: AuthenticateServer()/registration-failure paths have no error-detail API to log a real cause

Open
#35 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp

Research direction

Start with src/runtime/server/gameserver.cpp, especially OnTcpMsgRegistrationFailure, AuthenticateServer(), and the caller around lines 189 and 1347. Inspect what ServerDB sends in the forwarded msg blob and trace AuthenticateServer() callers before choosing the error-return API. Done means both failure paths expose a real cause in the existing ServerFatal logs without fabricated details.

Written by the indexing model from the issue text.

Description

Found while auditing log message quality in src/runtime/server/gameserver.cpp (repo-wide log audit).

Two ServerFatal(...) call sites have messages that are as good as they can be given what's actually available to them, but what's available is thin:

  1. gameserver.cpp:189 (OnTcpMsgRegistrationFailure) — ServerFatal("GameServer registration rejected by ServerDB"). The incoming msg/msgSize blob (the actual rejection reason from ServerDB) is forwarded opaquely to BroadcasterReceiveLocalEvent and never deserialized in this function, so no rejection reason string is ever available to log.
  2. gameserver.cpp:1347 (AuthenticateServer()'s caller) — ServerFatal("Server authentication failed — no valid token for ServerDB connection"). AuthenticateServer() returns only std::string (empty on failure), with no error detail for the caller to surface.

Both messages are honest about what's known — no fabricated data was added to either during the log audit — but an operator debugging a registration/auth failure currently has no cause in the log beyond "it failed."

Fix direction: (1) parse the msg blob in OnTcpMsgRegistrationFailure for a real rejection-reason field (likely a small protobuf/JSON payload — check what ServerDB actually sends on rejection); (2) change AuthenticateServer()'s return type to something like std::expected<std::string, std::string> (or an out-param for the error) so its caller can log a real cause instead of a bare "failed." Both are API changes, which is why they weren't done as part of the log-content-only audit commits.

Dominant language
C
Stars
2
Forks
2
Avg merge
3h 8m
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from EchoTools/nevr-runtime

All issues in EchoTools/nevr-runtime

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.