Bug 326523 - Reject blatantly invalid CTCP Ping responses

ChatZilla Only.
p=rdmsoft@bugs.rdmsoft.com (Robert Marshall)
r=samuel
This commit is contained in:
gijskruitbosch%gmail.com 2006-02-12 08:26:39 +00:00
parent 6d962143fd
commit c969315f1d
2 changed files with 11 additions and 2 deletions

View File

@ -1918,6 +1918,14 @@ function my_netdisconnect (e)
CIRCNetwork.prototype.onCTCPReplyPing =
function my_replyping (e)
{
// see bug 326523
if (e.CTCPData.length != 13)
{
this.display(getMsg(MSG_PING_REPLY_INVALID, e.user.unicodeName),
"INFO", e.user, "ME!");
return;
}
var delay = formatDateOffset((new Date() - new Date(Number(e.CTCPData))) /
1000);
this.display(getMsg(MSG_PING_REPLY, [e.user.unicodeName, delay]), "INFO",

View File

@ -1148,8 +1148,9 @@ msg.confirm.disconnect.all = Are you sure you want to disconnect from ALL networ
msg.no.connected.nets = You are not connected to any networks.
msg.no.reconnectable.nets = There are no networks to reconnect to.
msg.ping.reply = Ping reply from %S in %S"
msg.prefix.response = "%S, your result is,
msg.ping.reply = Ping reply from %S in %S.
msg.ping.reply.invalid = Malformed ping reply from %S.
msg.prefix.response = "%S, your result is,
msg.topic.changed = "%S has changed the topic to ``%S''
msg.topic = Topic for %S is ``%S''