mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 13:49:12 +02:00
always allow connection from localhost user
This commit is contained in:
parent
e40aff4864
commit
f637f5a4a6
4 changed files with 13 additions and 11 deletions
|
@ -556,14 +556,17 @@ void DomainServer::handleConnectRequest(const QByteArray& packet, const HifiSock
|
||||||
static QVariantList allowedUsers = allowedUsersVariant ? allowedUsersVariant->toList() : QVariantList();
|
static QVariantList allowedUsers = allowedUsersVariant ? allowedUsersVariant->toList() : QVariantList();
|
||||||
|
|
||||||
if (!isAssignment && allowedUsers.count() > 0) {
|
if (!isAssignment && allowedUsers.count() > 0) {
|
||||||
// this is an agent, we need to ask them to provide us with their signed username to see if they are allowed in
|
// this is an agent, we need to ask them to provide us with their signed username to see if they are allowed in
|
||||||
|
// we always let in a user who is sending a packet from our local socket or from the localhost address
|
||||||
QByteArray usernameRequestByteArray = byteArrayWithPopulatedHeader(PacketTypeDomainUsernameRequest);
|
if (senderSockAddr.getAddress() != LimitedNodeList::getInstance()->getLocalSockAddr().getAddress()
|
||||||
|
&& senderSockAddr.getAddress() != QHostAddress::LocalHost) {
|
||||||
// send this oauth request datagram back to the client
|
QByteArray usernameRequestByteArray = byteArrayWithPopulatedHeader(PacketTypeDomainUsernameRequest);
|
||||||
LimitedNodeList::getInstance()->writeUnverifiedDatagram(usernameRequestByteArray, senderSockAddr);
|
|
||||||
|
// send this oauth request datagram back to the client
|
||||||
return;
|
LimitedNodeList::getInstance()->writeUnverifiedDatagram(usernameRequestByteArray, senderSockAddr);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!isAssignment && !STATICALLY_ASSIGNED_NODES.contains(nodeType))
|
if ((!isAssignment && !STATICALLY_ASSIGNED_NODES.contains(nodeType))
|
||||||
|
|
|
@ -135,8 +135,6 @@ private:
|
||||||
QSet<QUuid> _webAuthenticationStateSet;
|
QSet<QUuid> _webAuthenticationStateSet;
|
||||||
QHash<QUuid, DomainServerWebSessionData> _cookieSessionHash;
|
QHash<QUuid, DomainServerWebSessionData> _cookieSessionHash;
|
||||||
|
|
||||||
HifiSockAddr _localSockAddr;
|
|
||||||
|
|
||||||
QHash<QUuid, NetworkPeer> _connectingICEPeers;
|
QHash<QUuid, NetworkPeer> _connectingICEPeers;
|
||||||
QHash<QUuid, HifiSockAddr> _connectedICEPeers;
|
QHash<QUuid, HifiSockAddr> _connectedICEPeers;
|
||||||
|
|
||||||
|
|
|
@ -679,7 +679,6 @@ void LimitedNodeList::updateLocalSockAddr() {
|
||||||
qDebug() << "Local socket has changed from" << _localSockAddr << "to" << newSockAddr;
|
qDebug() << "Local socket has changed from" << _localSockAddr << "to" << newSockAddr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_localSockAddr = newSockAddr;
|
_localSockAddr = newSockAddr;
|
||||||
|
|
||||||
emit localSockAddrChanged(_localSockAddr);
|
emit localSockAddrChanged(_localSockAddr);
|
||||||
|
|
|
@ -101,6 +101,8 @@ public:
|
||||||
const HifiSockAddr& publicSocket, const HifiSockAddr& localSocket);
|
const HifiSockAddr& publicSocket, const HifiSockAddr& localSocket);
|
||||||
SharedNodePointer updateSocketsForNode(const QUuid& uuid,
|
SharedNodePointer updateSocketsForNode(const QUuid& uuid,
|
||||||
const HifiSockAddr& publicSocket, const HifiSockAddr& localSocket);
|
const HifiSockAddr& publicSocket, const HifiSockAddr& localSocket);
|
||||||
|
|
||||||
|
const HifiSockAddr& getLocalSockAddr() const { return _localSockAddr; }
|
||||||
|
|
||||||
void processNodeData(const HifiSockAddr& senderSockAddr, const QByteArray& packet);
|
void processNodeData(const HifiSockAddr& senderSockAddr, const QByteArray& packet);
|
||||||
void processKillNode(const QByteArray& datagram);
|
void processKillNode(const QByteArray& datagram);
|
||||||
|
|
Loading…
Reference in a new issue