diff options
-rw-r--r-- | ChangeLog.adoc | 1 | ||||
-rw-r--r-- | doc/de/autogen/user/relay_options.adoc | 7 | ||||
-rw-r--r-- | doc/en/autogen/user/relay_options.adoc | 7 | ||||
-rw-r--r-- | doc/fr/autogen/user/relay_options.adoc | 7 | ||||
-rw-r--r-- | doc/it/autogen/user/relay_options.adoc | 7 | ||||
-rw-r--r-- | doc/ja/autogen/user/relay_options.adoc | 7 | ||||
-rw-r--r-- | doc/pl/autogen/user/relay_options.adoc | 7 | ||||
-rw-r--r-- | po/cs.po | 16 | ||||
-rw-r--r-- | po/de.po | 17 | ||||
-rw-r--r-- | po/es.po | 16 | ||||
-rw-r--r-- | po/fr.po | 26 | ||||
-rw-r--r-- | po/hu.po | 16 | ||||
-rw-r--r-- | po/it.po | 17 | ||||
-rw-r--r-- | po/ja.po | 17 | ||||
-rw-r--r-- | po/pl.po | 17 | ||||
-rw-r--r-- | po/pt.po | 17 | ||||
-rw-r--r-- | po/pt_BR.po | 16 | ||||
-rw-r--r-- | po/ru.po | 16 | ||||
-rw-r--r-- | po/tr.po | 16 | ||||
-rw-r--r-- | po/weechat.pot | 16 | ||||
-rw-r--r-- | src/plugins/relay/relay-config.c | 17 | ||||
-rw-r--r-- | src/plugins/relay/relay-config.h | 1 | ||||
-rw-r--r-- | src/plugins/relay/relay-server.c | 17 |
23 files changed, 261 insertions, 40 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index d39471737..c9e1331d4 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -21,6 +21,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] New features:: * doc: switch to asciidoctor to build docs and man page + * relay: add option relay.network.allow_empty_password (issue #735) Bugs fixed:: diff --git a/doc/de/autogen/user/relay_options.adoc b/doc/de/autogen/user/relay_options.adoc index 57b7ae336..ad2e002ec 100644 --- a/doc/de/autogen/user/relay_options.adoc +++ b/doc/de/autogen/user/relay_options.adoc @@ -87,6 +87,11 @@ ** Typ: integer ** Werte: 0 .. 65535 (Standardwert: `+256+`) +* [[option_relay.network.allow_empty_password]] *relay.network.allow_empty_password* +** Beschreibung: pass:none[allow empty password in relay (it should be enabled only for tests or local network)] +** Typ: boolesch +** Werte: on, off (Standardwert: `+off+`) + * [[option_relay.network.allowed_ips]] *relay.network.allowed_ips* ** Beschreibung: pass:none[erweiterter regulärer POSIX Ausdruck für IPs die von relay akzeptiert werden (Groß- und Kleinschreibung wird ignoriert. Um zwischen Groß- und Kleinschreibung zu unterscheiden muss die Zeichenkette mit "(?-i)" eingeleitet werden), Beispiele: "^(123.45.67.89|192.160.*)$"] ** Typ: Zeichenkette @@ -118,7 +123,7 @@ ** Werte: 0 .. 2147483647 (Standardwert: `+5+`) * [[option_relay.network.password]] *relay.network.password* -** Beschreibung: pass:none[Passwort wird von Clients benötigt um Zugriff auf dieses Relay zu erhalten (kein Eintrag bedeutet, dass kein Passwort benötigt wird) (Hinweis: Inhalt wird evaluiert, siehe /help eval)] +** Beschreibung: pass:none[password required by clients to access this relay (empty value means no password required, see option relay.network.allow_empty_password) (note: content is evaluated, see /help eval)] ** Typ: Zeichenkette ** Werte: beliebige Zeichenkette (Standardwert: `+""+`) diff --git a/doc/en/autogen/user/relay_options.adoc b/doc/en/autogen/user/relay_options.adoc index 63cb02d8d..85c49a3f5 100644 --- a/doc/en/autogen/user/relay_options.adoc +++ b/doc/en/autogen/user/relay_options.adoc @@ -87,6 +87,11 @@ ** type: integer ** values: 0 .. 65535 (default value: `+256+`) +* [[option_relay.network.allow_empty_password]] *relay.network.allow_empty_password* +** description: pass:none[allow empty password in relay (it should be enabled only for tests or local network)] +** type: boolean +** values: on, off (default value: `+off+`) + * [[option_relay.network.allowed_ips]] *relay.network.allowed_ips* ** description: pass:none[POSIX extended regular expression with IPs allowed to use relay (case insensitive, use "(?-i)" at beginning to make it case sensitive), example: "^(123.45.67.89|192.160.*)$"] ** type: string @@ -118,7 +123,7 @@ ** values: 0 .. 2147483647 (default value: `+5+`) * [[option_relay.network.password]] *relay.network.password* -** description: pass:none[password required by clients to access this relay (empty value means no password required) (note: content is evaluated, see /help eval)] +** description: pass:none[password required by clients to access this relay (empty value means no password required, see option relay.network.allow_empty_password) (note: content is evaluated, see /help eval)] ** type: string ** values: any string (default value: `+""+`) diff --git a/doc/fr/autogen/user/relay_options.adoc b/doc/fr/autogen/user/relay_options.adoc index 415f09492..929a6d598 100644 --- a/doc/fr/autogen/user/relay_options.adoc +++ b/doc/fr/autogen/user/relay_options.adoc @@ -87,6 +87,11 @@ ** type: entier ** valeurs: 0 .. 65535 (valeur par défaut: `+256+`) +* [[option_relay.network.allow_empty_password]] *relay.network.allow_empty_password* +** description: pass:none[autoriser un mot de passe vide dans relay (devrait être activé seulement pour des tests ou sur le réseau local)] +** type: booléen +** valeurs: on, off (valeur par défaut: `+off+`) + * [[option_relay.network.allowed_ips]] *relay.network.allowed_ips* ** description: pass:none[expression régulière POSIX étendue avec les IPs autorisées pour le relai (insensible à la casse, utilisez "(?-i)" en début de chaîne pour la rendre insensible à la casse), exemple : "^(123.45.67.89|192.160.*)$"] ** type: chaîne @@ -118,7 +123,7 @@ ** valeurs: 0 .. 2147483647 (valeur par défaut: `+5+`) * [[option_relay.network.password]] *relay.network.password* -** description: pass:none[mot de passe requis par les clients pour accéder à ce relai (une valeur vide indique que le mot de passe n'est pas nécessaire) (note : le contenu est évalué, voir /help eval)] +** description: pass:none[mot de passe requis par les clients pour accéder à ce relai (une valeur vide indique que le mot de passe n'est pas nécessaire, voir l'option relay.network.allow_empty_password) (note : le contenu est évalué, voir /help eval)] ** type: chaîne ** valeurs: toute chaîne (valeur par défaut: `+""+`) diff --git a/doc/it/autogen/user/relay_options.adoc b/doc/it/autogen/user/relay_options.adoc index bad609372..d1704b104 100644 --- a/doc/it/autogen/user/relay_options.adoc +++ b/doc/it/autogen/user/relay_options.adoc @@ -87,6 +87,11 @@ ** tipo: intero ** valori: 0 .. 65535 (valore predefinito: `+256+`) +* [[option_relay.network.allow_empty_password]] *relay.network.allow_empty_password* +** descrizione: pass:none[allow empty password in relay (it should be enabled only for tests or local network)] +** tipo: bool +** valori: on, off (valore predefinito: `+off+`) + * [[option_relay.network.allowed_ips]] *relay.network.allowed_ips* ** descrizione: pass:none[POSIX extended regular expression with IPs allowed to use relay (case insensitive, use "(?-i)" at beginning to make it case sensitive), example: "^(123.45.67.89|192.160.*)$"] ** tipo: stringa @@ -118,7 +123,7 @@ ** valori: 0 .. 2147483647 (valore predefinito: `+5+`) * [[option_relay.network.password]] *relay.network.password* -** descrizione: pass:none[password richiesta dai client per accedere a questo relay (un valore nullo corrisponde a nessuna password richiesta) (nota: il contenuto viene valutato, consultare /help eval)] +** descrizione: pass:none[password required by clients to access this relay (empty value means no password required, see option relay.network.allow_empty_password) (note: content is evaluated, see /help eval)] ** tipo: stringa ** valori: qualsiasi stringa (valore predefinito: `+""+`) diff --git a/doc/ja/autogen/user/relay_options.adoc b/doc/ja/autogen/user/relay_options.adoc index ff6369403..a491fcfba 100644 --- a/doc/ja/autogen/user/relay_options.adoc +++ b/doc/ja/autogen/user/relay_options.adoc @@ -87,6 +87,11 @@ ** タイプ: 整数 ** 値: 0 .. 65535 (デフォルト値: `+256+`) +* [[option_relay.network.allow_empty_password]] *relay.network.allow_empty_password* +** 説明: pass:none[allow empty password in relay (it should be enabled only for tests or local network)] +** タイプ: ブール +** 値: on, off (デフォルト値: `+off+`) + * [[option_relay.network.allowed_ips]] *relay.network.allowed_ips* ** 説明: pass:none[リレーの利用を許可する IP アドレスの POSIX 拡張正規表現 (大文字小文字の区別無し、最初に "(?-i)" をつければ区別有り)、例: "^(123.45.67.89|192.160.*)$"] ** タイプ: 文字列 @@ -118,7 +123,7 @@ ** 値: 0 .. 2147483647 (デフォルト値: `+5+`) * [[option_relay.network.password]] *relay.network.password* -** 説明: pass:none[このリレーを利用するためにクライアントが必要なパスワード (空の場合パスワードなし) (注意: 値は評価されます、/help eval を参照してください)] +** 説明: pass:none[password required by clients to access this relay (empty value means no password required, see option relay.network.allow_empty_password) (note: content is evaluated, see /help eval)] ** タイプ: 文字列 ** 値: 未制約文字列 (デフォルト値: `+""+`) diff --git a/doc/pl/autogen/user/relay_options.adoc b/doc/pl/autogen/user/relay_options.adoc index 94f4fd074..7dde0dbc1 100644 --- a/doc/pl/autogen/user/relay_options.adoc +++ b/doc/pl/autogen/user/relay_options.adoc @@ -87,6 +87,11 @@ ** typ: liczba ** wartości: 0 .. 65535 (domyślna wartość: `+256+`) +* [[option_relay.network.allow_empty_password]] *relay.network.allow_empty_password* +** opis: pass:none[allow empty password in relay (it should be enabled only for tests or local network)] +** typ: bool +** wartości: on, off (domyślna wartość: `+off+`) + * [[option_relay.network.allowed_ips]] *relay.network.allowed_ips* ** opis: pass:none[rozszerzone wyrażenia regularne POSIX z adresami IP dozwolonymi dla pośrednika (nie wrażliwe na wielkość znaków, umieszczenie "(?-i)" na początku sprawi, że wielość znaków będzie miała znaczenie), przykład: "^(123.45.67.89|192.160.*)$"] ** typ: ciąg @@ -118,7 +123,7 @@ ** wartości: 0 .. 2147483647 (domyślna wartość: `+5+`) * [[option_relay.network.password]] *relay.network.password* -** opis: pass:none[hasło wymagane od klientów do połączenia z tym pośrednikiem (pusta wartość oznacza brak wymaganego hasła) (zawartość jest przetwarzana, zobacz /help eval)] +** opis: pass:none[password required by clients to access this relay (empty value means no password required, see option relay.network.allow_empty_password) (note: content is evaluated, see /help eval)] ** typ: ciąg ** wartości: dowolny ciąg (domyślna wartość: `+""+`) @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-05-18 07:45+0200\n" +"POT-Creation-Date: 2016-05-18 07:50+0200\n" "PO-Revision-Date: 2016-05-18 07:42+0200\n" "Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -9685,6 +9685,11 @@ msgid "text color of selected line in relay buffer" msgstr "barva textu řádku vybraného klienta" msgid "" +"allow empty password in relay (it should be enabled only for tests or local " +"network)" +msgstr "" + +msgid "" "POSIX extended regular expression with IPs allowed to use relay (case " "insensitive, use \"(?-i)\" at beginning to make it case sensitive), example: " "\"^(123.45.67.89|192.160.*)$\"" @@ -9721,7 +9726,8 @@ msgstr "maximální počet klientů připojených k portu" #, fuzzy msgid "" "password required by clients to access this relay (empty value means no " -"password required) (note: content is evaluated, see /help eval)" +"password required, see option relay.network.allow_empty_password) (note: " +"content is evaluated, see /help eval)" msgstr "" "heslo vyžadované klienty pro přístup k tomuto přesměrováni (prázdná hodnota " "značí, že heslo není vyžadováno)" @@ -9804,6 +9810,12 @@ msgid "%s%s: cannot accept client on port %d (%s): error %d %s" msgstr "%s%s: nemohu \"naslouchat\" na portu %d (%s): chyba %d %s" #, c-format +msgid "" +"%s%s: cannot accept client because relay password is empty, and option relay." +"network.allow_empty_password is off" +msgstr "" + +#, c-format msgid "%s%s: client not allowed (max %d client is allowed at same time)" msgid_plural "" "%s%s: client not allowed (max %d clients are allowed at same time)" @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-05-18 07:45+0200\n" +"POT-Creation-Date: 2016-05-18 07:50+0200\n" "PO-Revision-Date: 2016-05-18 07:42+0200\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <>\n" @@ -11026,6 +11026,11 @@ msgid "text color of selected line in relay buffer" msgstr "Textfarbe für selektierte Zeile in Relay-Buffer" msgid "" +"allow empty password in relay (it should be enabled only for tests or local " +"network)" +msgstr "" + +msgid "" "POSIX extended regular expression with IPs allowed to use relay (case " "insensitive, use \"(?-i)\" at beginning to make it case sensitive), example: " "\"^(123.45.67.89|192.160.*)$\"" @@ -11073,9 +11078,11 @@ msgstr "" "maximale Anzahl an Clients die mit einem Port verbunden sein dürfen (0 = " "keine Begrenzung)" +#, fuzzy msgid "" "password required by clients to access this relay (empty value means no " -"password required) (note: content is evaluated, see /help eval)" +"password required, see option relay.network.allow_empty_password) (note: " +"content is evaluated, see /help eval)" msgstr "" "Passwort wird von Clients benötigt um Zugriff auf dieses Relay zu erhalten " "(kein Eintrag bedeutet, dass kein Passwort benötigt wird) (Hinweis: Inhalt " @@ -11178,6 +11185,12 @@ msgid "%s%s: cannot accept client on port %d (%s): error %d %s" msgstr "%s%s: Der Client wird am Port %d (%s) nicht akzeptiert: Fehler %d %s" #, c-format +msgid "" +"%s%s: cannot accept client because relay password is empty, and option relay." +"network.allow_empty_password is off" +msgstr "" + +#, c-format msgid "%s%s: client not allowed (max %d client is allowed at same time)" msgid_plural "" "%s%s: client not allowed (max %d clients are allowed at same time)" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-05-18 07:45+0200\n" +"POT-Creation-Date: 2016-05-18 07:50+0200\n" "PO-Revision-Date: 2016-05-18 07:42+0200\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -10008,6 +10008,11 @@ msgstr "color de fondo en el buffer del repetidor" msgid "text color of selected line in relay buffer" msgstr "color del texto de la línea seleccionada en el buffer del repetidor" +msgid "" +"allow empty password in relay (it should be enabled only for tests or local " +"network)" +msgstr "" + # why is case insensitive important? ips use numbers and urls are case insensible. #, fuzzy msgid "" @@ -10054,7 +10059,8 @@ msgstr "número máximo de clientes conectados a un puerto" #, fuzzy msgid "" "password required by clients to access this relay (empty value means no " -"password required) (note: content is evaluated, see /help eval)" +"password required, see option relay.network.allow_empty_password) (note: " +"content is evaluated, see /help eval)" msgstr "" "los clientes requieren una clave para acceder este repetidor (sin valor " "significa que no se requiere clave)" @@ -10136,6 +10142,12 @@ msgid "%s%s: cannot accept client on port %d (%s): error %d %s" msgstr "%s%s: no se puede aceptar el cliente en el puerto %d (%s)" #, c-format +msgid "" +"%s%s: cannot accept client because relay password is empty, and option relay." +"network.allow_empty_password is off" +msgstr "" + +#, c-format msgid "%s%s: client not allowed (max %d client is allowed at same time)" msgid_plural "" "%s%s: client not allowed (max %d clients are allowed at same time)" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-05-18 07:45+0200\n" -"PO-Revision-Date: 2016-05-18 07:45+0200\n" +"POT-Creation-Date: 2016-05-18 07:50+0200\n" +"PO-Revision-Date: 2016-05-18 07:53+0200\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: fr\n" @@ -10778,6 +10778,13 @@ msgid "text color of selected line in relay buffer" msgstr "couleur du texte pour la ligne sélectionnée dans le tampon relay" msgid "" +"allow empty password in relay (it should be enabled only for tests or local " +"network)" +msgstr "" +"autoriser un mot de passe vide dans relay (devrait être activé seulement " +"pour des tests ou sur le réseau local)" + +msgid "" "POSIX extended regular expression with IPs allowed to use relay (case " "insensitive, use \"(?-i)\" at beginning to make it case sensitive), example: " "\"^(123.45.67.89|192.160.*)$\"" @@ -10824,11 +10831,12 @@ msgstr "" msgid "" "password required by clients to access this relay (empty value means no " -"password required) (note: content is evaluated, see /help eval)" +"password required, see option relay.network.allow_empty_password) (note: " +"content is evaluated, see /help eval)" msgstr "" "mot de passe requis par les clients pour accéder à ce relai (une valeur vide " -"indique que le mot de passe n'est pas nécessaire) (note : le contenu est " -"évalué, voir /help eval)" +"indique que le mot de passe n'est pas nécessaire, voir l'option relay." +"network.allow_empty_password) (note : le contenu est évalué, voir /help eval)" msgid "" "file with SSL certificate and private key (for serving clients with SSL)" @@ -10924,6 +10932,14 @@ msgstr "" "%s%s : impossible d'accepter le client sur le port %d (%s) : erreur %d %s" #, c-format +msgid "" +"%s%s: cannot accept client because relay password is empty, and option relay." +"network.allow_empty_password is off" +msgstr "" +"%s%s : impossible d'accepter le client car le mot de passe relay est vide, " +"et l'opion relay.network.allow_empty_password est désactivée" + +#, c-format msgid "%s%s: client not allowed (max %d client is allowed at same time)" msgid_plural "" "%s%s: client not allowed (max %d clients are allowed at same time)" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-05-18 07:45+0200\n" +"POT-Creation-Date: 2016-05-18 07:50+0200\n" "PO-Revision-Date: 2016-05-18 07:43+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -9051,6 +9051,11 @@ msgid "text color of selected line in relay buffer" msgstr "szerver nevének színe" msgid "" +"allow empty password in relay (it should be enabled only for tests or local " +"network)" +msgstr "" + +msgid "" "POSIX extended regular expression with IPs allowed to use relay (case " "insensitive, use \"(?-i)\" at beginning to make it case sensitive), example: " "\"^(123.45.67.89|192.160.*)$\"" @@ -9084,7 +9089,8 @@ msgstr "" msgid "" "password required by clients to access this relay (empty value means no " -"password required) (note: content is evaluated, see /help eval)" +"password required, see option relay.network.allow_empty_password) (note: " +"content is evaluated, see /help eval)" msgstr "" msgid "" @@ -9167,6 +9173,12 @@ msgid "%s%s: cannot accept client on port %d (%s): error %d %s" msgstr "%s nem sikerült a csatornát létrehozni\n" #, c-format +msgid "" +"%s%s: cannot accept client because relay password is empty, and option relay." +"network.allow_empty_password is off" +msgstr "" + +#, c-format msgid "%s%s: client not allowed (max %d client is allowed at same time)" msgid_plural "" "%s%s: client not allowed (max %d clients are allowed at same time)" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-05-18 07:45+0200\n" +"POT-Creation-Date: 2016-05-18 07:50+0200\n" "PO-Revision-Date: 2016-05-18 07:43+0200\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -10183,6 +10183,11 @@ msgstr "colore di sfondo nel buffer relay" msgid "text color of selected line in relay buffer" msgstr "colore del testo della riga selezionata nel buffer relay" +msgid "" +"allow empty password in relay (it should be enabled only for tests or local " +"network)" +msgstr "" + #, fuzzy msgid "" "POSIX extended regular expression with IPs allowed to use relay (case " @@ -10227,9 +10232,11 @@ msgstr "" msgid "maximum number of clients connecting to a port (0 = no limit)" msgstr "numero massimo di client connessi ad una porta" +#, fuzzy msgid "" "password required by clients to access this relay (empty value means no " -"password required) (note: content is evaluated, see /help eval)" +"password required, see option relay.network.allow_empty_password) (note: " +"content is evaluated, see /help eval)" msgstr "" "password richiesta dai client per accedere a questo relay (un valore nullo " "corrisponde a nessuna password richiesta) (nota: il contenuto viene " @@ -10316,6 +10323,12 @@ msgstr "" "%s%s: impossibile accettare il client sulla porta %d (%s): errore %d %s" #, c-format +msgid "" +"%s%s: cannot accept client because relay password is empty, and option relay." +"network.allow_empty_password is off" +msgstr "" + +#, c-format msgid "%s%s: client not allowed (max %d client is allowed at same time)" msgid_plural "" "%s%s: client not allowed (max %d clients are allowed at same time)" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-05-18 07:45+0200\n" +"POT-Creation-Date: 2016-05-18 07:50+0200\n" "PO-Revision-Date: 2016-05-18 07:43+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/weechat/tree/translation_ja>\n" @@ -10377,6 +10377,11 @@ msgid "text color of selected line in relay buffer" msgstr "リレーバッファ内の選択行のテキスト色" msgid "" +"allow empty password in relay (it should be enabled only for tests or local " +"network)" +msgstr "" + +msgid "" "POSIX extended regular expression with IPs allowed to use relay (case " "insensitive, use \"(?-i)\" at beginning to make it case sensitive), example: " "\"^(123.45.67.89|192.160.*)$\"" @@ -10417,9 +10422,11 @@ msgstr "" msgid "maximum number of clients connecting to a port (0 = no limit)" msgstr "ポートに接続するクライアントの最大数 (0 = 制限なし)" +#, fuzzy msgid "" "password required by clients to access this relay (empty value means no " -"password required) (note: content is evaluated, see /help eval)" +"password required, see option relay.network.allow_empty_password) (note: " +"content is evaluated, see /help eval)" msgstr "" "このリレーを利用するためにクライアントが必要なパスワード (空の場合パスワード" "なし) (注意: 値は評価されます、/help eval を参照してください)" @@ -10511,6 +10518,12 @@ msgstr "" "%s" #, c-format +msgid "" +"%s%s: cannot accept client because relay password is empty, and option relay." +"network.allow_empty_password is off" +msgstr "" + +#, c-format msgid "%s%s: client not allowed (max %d client is allowed at same time)" msgid_plural "" "%s%s: client not allowed (max %d clients are allowed at same time)" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-05-18 07:45+0200\n" +"POT-Creation-Date: 2016-05-18 07:50+0200\n" "PO-Revision-Date: 2016-05-18 07:43+0200\n" "Last-Translator: Krzysztof Korościk <soltys1@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -10571,6 +10571,11 @@ msgid "text color of selected line in relay buffer" msgstr "kolor tekstu zaznaczonej linii w buforze pośrednika" msgid "" +"allow empty password in relay (it should be enabled only for tests or local " +"network)" +msgstr "" + +msgid "" "POSIX extended regular expression with IPs allowed to use relay (case " "insensitive, use \"(?-i)\" at beginning to make it case sensitive), example: " "\"^(123.45.67.89|192.160.*)$\"" @@ -10614,9 +10619,11 @@ msgstr "" msgid "maximum number of clients connecting to a port (0 = no limit)" msgstr "maksymalna ilość klientów łączących się na port (0 = brak limitu)" +#, fuzzy msgid "" "password required by clients to access this relay (empty value means no " -"password required) (note: content is evaluated, see /help eval)" +"password required, see option relay.network.allow_empty_password) (note: " +"content is evaluated, see /help eval)" msgstr "" "hasło wymagane od klientów do połączenia z tym pośrednikiem (pusta wartość " "oznacza brak wymaganego hasła) (zawartość jest przetwarzana, zobacz /help " @@ -10715,6 +10722,12 @@ msgid "%s%s: cannot accept client on port %d (%s): error %d %s" msgstr "%s%s: nie można zaakceptować klienta na porcie %d (%s): błąd %d %s" #, c-format +msgid "" +"%s%s: cannot accept client because relay password is empty, and option relay." +"network.allow_empty_password is off" +msgstr "" + +#, c-format msgid "%s%s: client not allowed (max %d client is allowed at same time)" msgid_plural "" "%s%s: client not allowed (max %d clients are allowed at same time)" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-05-18 07:45+0200\n" +"POT-Creation-Date: 2016-05-18 07:50+0200\n" "PO-Revision-Date: 2016-05-18 07:43+0200\n" "Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n" "Language-Team: Portuguese <>\n" @@ -10576,6 +10576,11 @@ msgid "text color of selected line in relay buffer" msgstr "cor do texto da linha selecionada no buffer de reencaminhamento" msgid "" +"allow empty password in relay (it should be enabled only for tests or local " +"network)" +msgstr "" + +msgid "" "POSIX extended regular expression with IPs allowed to use relay (case " "insensitive, use \"(?-i)\" at beginning to make it case sensitive), example: " "\"^(123.45.67.89|192.160.*)$\"" @@ -10618,9 +10623,11 @@ msgstr "" msgid "maximum number of clients connecting to a port (0 = no limit)" msgstr "número máximo de clientes que se conectam a uma porta (0 = sem limite)" +#, fuzzy msgid "" "password required by clients to access this relay (empty value means no " -"password required) (note: content is evaluated, see /help eval)" +"password required, see option relay.network.allow_empty_password) (note: " +"content is evaluated, see /help eval)" msgstr "" "palavra-passe solicitada aos clientes para acederem a este reencaminhador (o " "valor vazio significa que a palavra-passe não é necessária) (nota: o " @@ -10716,6 +10723,12 @@ msgid "%s%s: cannot accept client on port %d (%s): error %d %s" msgstr "%s%s: não é possível aceitar o cliente na porta %d (%s): erro %d %s" #, c-format +msgid "" +"%s%s: cannot accept client because relay password is empty, and option relay." +"network.allow_empty_password is off" +msgstr "" + +#, c-format msgid "%s%s: client not allowed (max %d client is allowed at same time)" msgid_plural "" "%s%s: client not allowed (max %d clients are allowed at same time)" diff --git a/po/pt_BR.po b/po/pt_BR.po index fd3e1d9f2..2def095e3 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-05-18 07:45+0200\n" +"POT-Creation-Date: 2016-05-18 07:50+0200\n" "PO-Revision-Date: 2016-05-18 07:43+0200\n" "Last-Translator: Eduardo Elias <camponez@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -9478,6 +9478,11 @@ msgstr "cor de fundo para marcador de dados não lidos" msgid "text color of selected line in relay buffer" msgstr "cor do texto da linha do cliente selecionada" +msgid "" +"allow empty password in relay (it should be enabled only for tests or local " +"network)" +msgstr "" + #, fuzzy msgid "" "POSIX extended regular expression with IPs allowed to use relay (case " @@ -9520,7 +9525,8 @@ msgstr "número máximo de clientes conectando-se a uma porta" #, fuzzy msgid "" "password required by clients to access this relay (empty value means no " -"password required) (note: content is evaluated, see /help eval)" +"password required, see option relay.network.allow_empty_password) (note: " +"content is evaluated, see /help eval)" msgstr "" "senha necessária para clientes acessarem este relay (vazio significa que " "nenhuma senha é necessária)" @@ -9603,6 +9609,12 @@ msgid "%s%s: cannot accept client on port %d (%s): error %d %s" msgstr "%s%s: não foi possível aceitar o cliente na porta %d (%s): erro %d %s" #, c-format +msgid "" +"%s%s: cannot accept client because relay password is empty, and option relay." +"network.allow_empty_password is off" +msgstr "" + +#, c-format msgid "%s%s: client not allowed (max %d client is allowed at same time)" msgid_plural "" "%s%s: client not allowed (max %d clients are allowed at same time)" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-05-18 07:45+0200\n" +"POT-Creation-Date: 2016-05-18 07:50+0200\n" "PO-Revision-Date: 2016-05-18 07:43+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -9084,6 +9084,11 @@ msgid "text color of selected line in relay buffer" msgstr "цвет названия сервера" msgid "" +"allow empty password in relay (it should be enabled only for tests or local " +"network)" +msgstr "" + +msgid "" "POSIX extended regular expression with IPs allowed to use relay (case " "insensitive, use \"(?-i)\" at beginning to make it case sensitive), example: " "\"^(123.45.67.89|192.160.*)$\"" @@ -9116,7 +9121,8 @@ msgstr "максимальное количество команд в истор msgid "" "password required by clients to access this relay (empty value means no " -"password required) (note: content is evaluated, see /help eval)" +"password required, see option relay.network.allow_empty_password) (note: " +"content is evaluated, see /help eval)" msgstr "" msgid "" @@ -9197,6 +9203,12 @@ msgid "%s%s: cannot accept client on port %d (%s): error %d %s" msgstr "%s невозможно создать сокет\n" #, c-format +msgid "" +"%s%s: cannot accept client because relay password is empty, and option relay." +"network.allow_empty_password is off" +msgstr "" + +#, c-format msgid "%s%s: client not allowed (max %d client is allowed at same time)" msgid_plural "" "%s%s: client not allowed (max %d clients are allowed at same time)" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-05-18 07:45+0200\n" +"POT-Creation-Date: 2016-05-18 07:50+0200\n" "PO-Revision-Date: 2016-05-18 07:43+0200\n" "Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -8192,6 +8192,11 @@ msgid "text color of selected line in relay buffer" msgstr "" msgid "" +"allow empty password in relay (it should be enabled only for tests or local " +"network)" +msgstr "" + +msgid "" "POSIX extended regular expression with IPs allowed to use relay (case " "insensitive, use \"(?-i)\" at beginning to make it case sensitive), example: " "\"^(123.45.67.89|192.160.*)$\"" @@ -8223,7 +8228,8 @@ msgstr "" msgid "" "password required by clients to access this relay (empty value means no " -"password required) (note: content is evaluated, see /help eval)" +"password required, see option relay.network.allow_empty_password) (note: " +"content is evaluated, see /help eval)" msgstr "" msgid "" @@ -8298,6 +8304,12 @@ msgid "%s%s: cannot accept client on port %d (%s): error %d %s" msgstr "" #, c-format +msgid "" +"%s%s: cannot accept client because relay password is empty, and option relay." +"network.allow_empty_password is off" +msgstr "" + +#, c-format msgid "%s%s: client not allowed (max %d client is allowed at same time)" msgid_plural "" "%s%s: client not allowed (max %d clients are allowed at same time)" diff --git a/po/weechat.pot b/po/weechat.pot index e67e14816..c838fa805 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-05-18 07:45+0200\n" +"POT-Creation-Date: 2016-05-18 07:50+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -8117,6 +8117,11 @@ msgid "text color of selected line in relay buffer" msgstr "" msgid "" +"allow empty password in relay (it should be enabled only for tests or local " +"network)" +msgstr "" + +msgid "" "POSIX extended regular expression with IPs allowed to use relay (case " "insensitive, use \"(?-i)\" at beginning to make it case sensitive), example: " "\"^(123.45.67.89|192.160.*)$\"" @@ -8148,7 +8153,8 @@ msgstr "" msgid "" "password required by clients to access this relay (empty value means no " -"password required) (note: content is evaluated, see /help eval)" +"password required, see option relay.network.allow_empty_password) (note: " +"content is evaluated, see /help eval)" msgstr "" msgid "" @@ -8223,6 +8229,12 @@ msgid "%s%s: cannot accept client on port %d (%s): error %d %s" msgstr "" #, c-format +msgid "" +"%s%s: cannot accept client because relay password is empty, and option relay." +"network.allow_empty_password is off" +msgstr "" + +#, c-format msgid "%s%s: client not allowed (max %d client is allowed at same time)" msgid_plural "" "%s%s: client not allowed (max %d clients are allowed at same time)" diff --git a/src/plugins/relay/relay-config.c b/src/plugins/relay/relay-config.c index 3d979ee01..b6a3cf078 100644 --- a/src/plugins/relay/relay-config.c +++ b/src/plugins/relay/relay-config.c @@ -52,6 +52,7 @@ struct t_config_option *relay_config_color_text_selected; /* relay config, network section */ +struct t_config_option *relay_config_network_allow_empty_password; struct t_config_option *relay_config_network_allowed_ips; struct t_config_option *relay_config_network_bind_address; struct t_config_option *relay_config_network_clients_purge_delay; @@ -750,6 +751,13 @@ relay_config_init () return 0; } + relay_config_network_allow_empty_password = weechat_config_new_option ( + relay_config_file, ptr_section, + "allow_empty_password", "boolean", + N_("allow empty password in relay (it should be enabled only for " + "tests or local network)"), + NULL, 0, 0, "off", NULL, 0, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); relay_config_network_allowed_ips = weechat_config_new_option ( relay_config_file, ptr_section, "allowed_ips", "string", @@ -768,9 +776,7 @@ relay_config_init () "interfaces, use \"127.0.0.1\" to allow connections from " "local machine only)"), NULL, 0, 0, "", NULL, 0, - NULL, NULL, NULL, - &relay_config_change_network_bind_address_cb, NULL, NULL, - NULL, NULL, NULL); + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); relay_config_network_clients_purge_delay = weechat_config_new_option ( relay_config_file, ptr_section, "clients_purge_delay", "integer", @@ -806,8 +812,9 @@ relay_config_init () relay_config_file, ptr_section, "password", "string", N_("password required by clients to access this relay (empty value " - "means no password required) (note: content is evaluated, see " - "/help eval)"), + "means no password required, see option " + "relay.network.allow_empty_password) (note: content is evaluated, " + "see /help eval)"), NULL, 0, 0, "", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); relay_config_network_ssl_cert_key = weechat_config_new_option ( diff --git a/src/plugins/relay/relay-config.h b/src/plugins/relay/relay-config.h index 329ffe2a4..6ce0f7364 100644 --- a/src/plugins/relay/relay-config.h +++ b/src/plugins/relay/relay-config.h @@ -36,6 +36,7 @@ extern struct t_config_option *relay_config_color_text; extern struct t_config_option *relay_config_color_text_bg; extern struct t_config_option *relay_config_color_text_selected; +extern struct t_config_option *relay_config_network_allow_empty_password; extern struct t_config_option *relay_config_network_allowed_ips; extern struct t_config_option *relay_config_network_bind_address; extern struct t_config_option *relay_config_network_clients_purge_delay; diff --git a/src/plugins/relay/relay-server.c b/src/plugins/relay/relay-server.c index b6e2cfc44..9dfa38fdd 100644 --- a/src/plugins/relay/relay-server.c +++ b/src/plugins/relay/relay-server.c @@ -229,6 +229,7 @@ relay_server_sock_cb (const void *pointer, void *data, int fd) int client_fd, flags, set, max_clients, num_clients_on_port; char ipv4_address[INET_ADDRSTRLEN + 1], ipv6_address[INET6_ADDRSTRLEN + 1]; char *ptr_ip_address; + const char *relay_password; /* make C compiler happy */ (void) data; @@ -261,6 +262,22 @@ relay_server_sock_cb (const void *pointer, void *data, int fd) return WEECHAT_RC_OK; } + /* check if relay password is empty and if it is not allowed */ + relay_password = weechat_string_eval_expression ( + weechat_config_string (relay_config_network_password), + NULL, NULL, NULL); + if (!weechat_config_boolean (relay_config_network_allow_empty_password) + && (!relay_password || !relay_password[0])) + { + weechat_printf (NULL, + _("%s%s: cannot accept client because relay password " + "is empty, and option " + "relay.network.allow_empty_password is off"), + weechat_prefix ("error"), RELAY_PLUGIN_NAME); + close (client_fd); + return WEECHAT_RC_OK; + } + /* check if we have reached the max number of clients on this port */ max_clients = weechat_config_integer (relay_config_network_max_clients); if (max_clients > 0) |