Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
trusted_sources.h File Reference
#include <QHostAddress>
#include <QString>
Include dependency graph for trusted_sources.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool isTrustedSource (const QString &trustedSources, const QHostAddress &address)
 True if address is listed in the comma-separated trustedSources (security/trusted_sources).
bool isTrustedSource (const QString &trustedSources, const QString &address)
 Overload for an address in string form; an unparsable string never matches.

Function Documentation

◆ isTrustedSource() [1/2]

bool isTrustedSource ( const QString & trustedSources,
const QHostAddress & address )

True if address is listed in the comma-separated trustedSources (security/trusted_sources).

Entries are parsed as addresses and compared exactly, never as substrings, so 27.0.0.1 does not match 127.0.0.1. IPv4-mapped IPv6 addresses compare equal to their IPv4 form: a dual-stack listener reports a local proxy as ::ffff:127.0.0.1, which matches a 127.0.0.1 entry. Malformed entries and null addresses never match.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isTrustedSource() [2/2]

bool isTrustedSource ( const QString & trustedSources,
const QString & address )

Overload for an address in string form; an unparsable string never matches.

Here is the call graph for this function: