mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 23:45:35 +08:00
Avoid colons in VATLIB packets https://discordapp.com/channels/539048679160676382/567983892791951374/585899398387728395
This commit is contained in:
committed by
Mat Sutcliffe
parent
3510e20290
commit
c9846f45ee
@@ -303,7 +303,11 @@ namespace BlackCore
|
||||
QByteArray CNetworkVatlib::toFSDnoColon(const QString &qstr) const
|
||||
{
|
||||
if (!qstr.contains(':')) { return toFSD(qstr); }
|
||||
BLACK_VERIFY_X(false, Q_FUNC_INFO, "Illegal char :");
|
||||
if (CBuildConfig::isLocalDeveloperDebugBuild())
|
||||
{
|
||||
// so we can investigate
|
||||
BLACK_VERIFY_X(false, Q_FUNC_INFO, "Illegal char :");
|
||||
}
|
||||
QString copy(qstr);
|
||||
return toFSD(copy.remove(':'));
|
||||
}
|
||||
@@ -719,7 +723,7 @@ namespace BlackCore
|
||||
|
||||
void CNetworkVatlib::replyToNameQuery(const CCallsign &callsign) // private
|
||||
{
|
||||
QStringList response { m_server.getUser().getRealNameAndHomeBase(), "" };
|
||||
QStringList response { removeColon(m_server.getUser().getRealNameAndHomeBase()), "" };
|
||||
Vat_SendClientQueryResponse(m_net.data(), vatClientQueryName, toFSD(callsign), toFSD(response)(), response.size());
|
||||
}
|
||||
|
||||
@@ -1340,6 +1344,10 @@ namespace BlackCore
|
||||
{
|
||||
QPointer<CNetworkVatlib> self(cbvar_cast(cbvar));
|
||||
const CCallsign callsign(self->fromFSD(callsignString));
|
||||
const bool valid = !callsign.isEmpty();
|
||||
BLACK_AUDIT_X(valid, Q_FUNC_INFO, "No callsign");
|
||||
if (!valid) { return; }
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case vatClientQueryFreq:
|
||||
|
||||
Reference in New Issue
Block a user