Browse Source

Disabled some checking

adaptive-webui-19844
Christophe Dumez 14 years ago
parent
commit
6855edf649
  1. 8
      src/tracker/qtracker.cpp

8
src/tracker/qtracker.cpp

@ -130,11 +130,11 @@ void QTracker::respondToAnnounceRequest(QTcpSocket *socket, const HttpRequestPar @@ -130,11 +130,11 @@ void QTracker::respondToAnnounceRequest(QTcpSocket *socket, const HttpRequestPar
}
annonce_req.info_hash = parser.get("info_hash");
// info_hash cannot be longer than 20 bytes
if(annonce_req.info_hash.toAscii().length() > 20) {
/*if(annonce_req.info_hash.toAscii().length() > 20) {
qDebug("QTracker: Info_hash is not 20 byte long: %s (%d)", qPrintable(annonce_req.info_hash), annonce_req.info_hash.toAscii().length());
respondInvalidRequest(socket, 150, "Invalid infohash");
return;
}
}*/
// 2. Get peer ID
if(parser.get("peer_id").isNull()) {
qDebug("QTracker: Missing peer_id");
@ -143,11 +143,11 @@ void QTracker::respondToAnnounceRequest(QTcpSocket *socket, const HttpRequestPar @@ -143,11 +143,11 @@ void QTracker::respondToAnnounceRequest(QTcpSocket *socket, const HttpRequestPar
}
annonce_req.peer.peer_id = parser.get("peer_id");
// peer_id cannot be longer than 20 bytes
if(annonce_req.peer.peer_id.length() > 20) {
/*if(annonce_req.peer.peer_id.length() > 20) {
qDebug("QTracker: peer_id is not 20 byte long: %s", qPrintable(annonce_req.peer.peer_id));
respondInvalidRequest(socket, 151, "Invalid peerid");
return;
}
}*/
// 3. Get port
if(parser.get("port").isNull()) {
qDebug("QTracker: Missing port");

Loading…
Cancel
Save