Bug 1536108 - Avoid sending secondary numbers in OTR query message. r=mkmelin
This commit is contained in:
Родитель
e0f08d4ab3
Коммит
73be2258cb
|
@ -91,6 +91,7 @@ resent = [resent]
|
|||
tlv-disconnected = { $name } has ended their encrypted conversation with you; you should do the same.
|
||||
|
||||
# Do not translate "Off-the-Record" and "OTR" which is the name of an encryption protocol
|
||||
# Make sure that this string does NOT contain any numbers, e.g. like "3".
|
||||
# Variables:
|
||||
# $name (String) - the screen name of a chat contact person
|
||||
query-msg = { $name } has requested an Off-the-Record (OTR) encrypted conversation. However, you do not have a plugin to support that. See https://en.wikipedia.org/wiki/Off-the-Record_Messaging for more information.
|
||||
|
|
|
@ -522,7 +522,11 @@ var OTR = {
|
|||
// Use the default msg to format the version.
|
||||
// We don't supprt v1 of the protocol so this should be fine.
|
||||
let queryMsg = /^\?OTR.*?\?/.exec(query.readString())[0] + "\n";
|
||||
queryMsg += _strArgs("query-msg", {name: conv.account.normalizedName});
|
||||
// Avoid sending any numbers in the query message, because receiving
|
||||
// software could misinterpret it as a protocol version.
|
||||
// See https://bugzilla.mozilla.org/show_bug.cgi?id=1536108
|
||||
let noNumbersName = conv.account.normalizedName.replace(/[0-9]/g, "#");
|
||||
queryMsg += _strArgs("query-msg", {name: noNumbersName});
|
||||
conv.sendMsg(queryMsg);
|
||||
OTRLib.otrl_message_free(query);
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче