core: add info_hashtable "secured_data"

This commit is contained in:
Sébastien Helleu 2021-02-25 19:06:47 +01:00
parent 5725c8561c
commit 3d587ad37d
22 changed files with 217 additions and 16 deletions

View File

@ -28,6 +28,7 @@ New features::
* core: add option "recreate" in command /filter
* core: add raw string in evaluation of expressions with "raw:xxx" (issue #1611)
* core: add evaluation of conditions in evaluation of expressions with "eval_cond:" (issue #1582)
* api: add info_hashtable "secured_data"
* irc: add info "irc_is_message_ignored"
* irc: add server option "default_chantypes", used when the server does not send them in message 005 (issue #1610)
* trigger: add variable "${tg_trigger_name}" in command trigger evaluated strings (issue #1580)

View File

@ -14,5 +14,7 @@
| weechat | focus_info | Fokusinformationen abrufen | "x": x-Koordinate (Zeichenfolge mit Ganzzahl >= 0), "y": y-Koordinate (Zeichenfolge mit Ganzzahl >= 0) | siehe Funktion "hook_focus" in API Dokumentation
| weechat | secured_data | secured data | - | secured data: names and values (be careful: the values are sensitive data: do NOT print/log them anywhere)
|===
// end::infos_hashtable[]

View File

@ -674,7 +674,7 @@ class AutogenDoc():
for info in sorted(infos[plugin]):
_inf = infos[plugin][info]
desc = translate(_inf['description'])
args_desc = translate(_inf['args_description'] or '-')
args_desc = translate(_inf['args_description']) or '-'
self.write('| %s | %s | %s | %s\n',
escape(plugin), escape(info), escape(desc),
escape(args_desc))
@ -694,7 +694,7 @@ class AutogenDoc():
for info in sorted(infos_hashtable[plugin]):
_inh = infos_hashtable[plugin][info]
desc = translate(_inh['description'])
args_desc = translate(_inh['args_description'])
args_desc = translate(_inh['args_description']) or '-'
output_desc = translate(_inh['output_description']) or '-'
self.write('| %s | %s | %s | %s | %s\n',
escape(plugin), escape(info), escape(desc),

View File

@ -14,5 +14,7 @@
| weechat | focus_info | get focus info | "x": x coordinate (string with integer >= 0), "y": y coordinate (string with integer >= 0) | see function "hook_focus" in Plugin API reference
| weechat | secured_data | secured data | - | secured data: names and values (be careful: the values are sensitive data: do NOT print/log them anywhere)
|===
// end::infos_hashtable[]

View File

@ -14,5 +14,7 @@
| weechat | focus_info | obtenir l'information de focus | "x" : coordonnée x (chaîne avec un entier >= 0), "y" : coordonnée y (chaîne avec un entier >= 0) | voir la fonction hook_focus dans la Référence API extension
| weechat | secured_data | données sécurisées | - | données sécurisées : noms et valeurs (attention : les valeurs sont des données sensibles : il ne faut PAS les afficher/logger)
|===
// end::infos_hashtable[]

View File

@ -14,5 +14,7 @@
| weechat | focus_info | get focus info | "x": x coordinate (string with integer >= 0), "y": y coordinate (string with integer >= 0) | see function "hook_focus" in Plugin API reference
| weechat | secured_data | secured data | - | secured data: names and values (be careful: the values are sensitive data: do NOT print/log them anywhere)
|===
// end::infos_hashtable[]

View File

@ -14,5 +14,7 @@
| weechat | focus_info | get focus info | "x": x coordinate (string with integer >= 0), "y": y coordinate (string with integer >= 0) | see function "hook_focus" in Plugin API reference
| weechat | secured_data | secured data | - | secured data: names and values (be careful: the values are sensitive data: do NOT print/log them anywhere)
|===
// end::infos_hashtable[]

View File

@ -14,5 +14,7 @@
| weechat | focus_info | pobierz informacje o focusie | "x": współrzędne w osi x (ciąg z liczbą >= 0), "y": y współrzędne w osi y (ciąg z liczbą >= 0) | zobacz funkcję „hook_focus” w opisie API wtyczek
| weechat | secured_data | secured data | - | secured data: names and values (be careful: the values are sensitive data: do NOT print/log them anywhere)
|===
// end::infos_hashtable[]

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-02-09 20:31+0100\n"
"POT-Creation-Date: 2021-02-25 18:40+0100\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -4336,6 +4336,15 @@ msgstr ""
msgid "password for proxy server (note: content is evaluated, see /help eval)"
msgstr "heslo pro proxy server(pozn.: obsah je vykonán, viz /help eval)"
#, fuzzy
msgid "secured data"
msgstr "Chráněná data:"
msgid ""
"secured data: names and values (be careful: the values are sensitive data: "
"do NOT print/log them anywhere)"
msgstr ""
msgid "WeeChat secured data (sec.conf) | Keys: [alt-v] Toggle values"
msgstr "Chráněná data WeeChatu (sec.conf) | Klávesy: [alt-v] Přepnou hodnoty"
@ -13225,3 +13234,7 @@ msgstr "%s%s: vypršel časový limit \"%s\" pro %s"
#, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: nemohu se připojit\" neočekávaná chyba (%d)"
#, fuzzy
#~ msgid "secured data: names and values"
#~ msgstr "Chráněná data \"%s\" smazána"

View File

@ -24,7 +24,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-02-09 20:31+0100\n"
"POT-Creation-Date: 2021-02-25 18:40+0100\n"
"PO-Revision-Date: 2021-02-10 08:08+0100\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@ -5261,6 +5261,15 @@ msgid "password for proxy server (note: content is evaluated, see /help eval)"
msgstr ""
"Passwort für Proxy Server (Hinweis: Inhalt wird evaluiert, siehe /help eval)"
#, fuzzy
msgid "secured data"
msgstr "Schutzwürdige Daten:"
msgid ""
"secured data: names and values (be careful: the values are sensitive data: "
"do NOT print/log them anywhere)"
msgstr ""
msgid "WeeChat secured data (sec.conf) | Keys: [alt-v] Toggle values"
msgstr ""
"WeeChat schutzwürdigen Daten (sec.conf) | Tastenbefehle: [alt-v] Werte "
@ -15537,3 +15546,7 @@ msgstr "%s%s: Zeitüberschreitung für \"%s\" mit %s"
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr ""
"%s%s: Verbindung konnte nicht hergestellt werden: unerwarteter Fehler (%d)"
#, fuzzy
#~ msgid "secured data: names and values"
#~ msgstr "Schutzwürdige Information \"%s\" gelöscht"

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-02-09 20:31+0100\n"
"POT-Creation-Date: 2021-02-25 18:40+0100\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -4530,6 +4530,14 @@ msgstr ""
msgid "password for proxy server (note: content is evaluated, see /help eval)"
msgstr ""
msgid "secured data"
msgstr ""
msgid ""
"secured data: names and values (be careful: the values are sensitive data: "
"do NOT print/log them anywhere)"
msgstr ""
msgid "WeeChat secured data (sec.conf) | Keys: [alt-v] Toggle values"
msgstr ""
@ -13506,3 +13514,7 @@ msgstr "%s%s: tiempo de espera máximo para \"%s\" con %s"
#, fuzzy, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: no es posible conectarse al transmisor"
#, fuzzy
#~ msgid "secured data: names and values"
#~ msgstr "Barra eliminada"

View File

@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-02-09 20:31+0100\n"
"PO-Revision-Date: 2021-02-09 20:25+0100\n"
"POT-Creation-Date: 2021-02-25 18:40+0100\n"
"PO-Revision-Date: 2021-02-25 18:41+0100\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@ -5133,6 +5133,16 @@ msgstr ""
"mot de passe pour le serveur proxy (note : le contenu est évalué, voir /help "
"eval)"
msgid "secured data"
msgstr "données sécurisées"
msgid ""
"secured data: names and values (be careful: the values are sensitive data: "
"do NOT print/log them anywhere)"
msgstr ""
"données sécurisées : noms et valeurs (attention : les valeurs sont des "
"données sensibles : il ne faut PAS les afficher/logger)"
msgid "WeeChat secured data (sec.conf) | Keys: [alt-v] Toggle values"
msgstr ""
"Données sécurisées WeeChat (sec.conf) | Touches : [alt-v] Afficher/cacher "
@ -15224,3 +15234,6 @@ msgstr "%s%s : délai d'attente dépassé pour \"%s\" avec %s"
#, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s : impossible de se connecter : erreur inattendue (%d)"
#~ msgid "secured data: names and values"
#~ msgstr "données sécurisées : noms et valeurs"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-02-09 20:31+0100\n"
"POT-Creation-Date: 2021-02-25 18:40+0100\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -3893,6 +3893,14 @@ msgstr ""
msgid "password for proxy server (note: content is evaluated, see /help eval)"
msgstr ""
msgid "secured data"
msgstr ""
msgid ""
"secured data: names and values (be careful: the values are sensitive data: "
"do NOT print/log them anywhere)"
msgstr ""
msgid "WeeChat secured data (sec.conf) | Keys: [alt-v] Toggle values"
msgstr ""
@ -12464,3 +12472,7 @@ msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n"
#, fuzzy, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s DCC: nem sikerült kapcsolódni a küldőhöz\n"
#, fuzzy
#~ msgid "secured data: names and values"
#~ msgstr "a felhasználók le lettek tiltva"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-02-09 20:31+0100\n"
"POT-Creation-Date: 2021-02-25 18:40+0100\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -4650,6 +4650,15 @@ msgstr ""
"password per il server proxy (nota: il contenuto viene valutato, consultare /"
"help eval)"
#, fuzzy
msgid "secured data"
msgstr "Dati sicuri:"
msgid ""
"secured data: names and values (be careful: the values are sensitive data: "
"do NOT print/log them anywhere)"
msgstr ""
msgid "WeeChat secured data (sec.conf) | Keys: [alt-v] Toggle values"
msgstr ""
@ -13728,3 +13737,7 @@ msgstr "%s%s: timeout per \"%s\" con %s"
#, fuzzy, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: impossibile connettersi al mittente"
#, fuzzy
#~ msgid "secured data: names and values"
#~ msgstr "Dati sicuri \"%s\" eliminati"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-02-09 20:31+0100\n"
"POT-Creation-Date: 2021-02-25 18:40+0100\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@ -4874,6 +4874,15 @@ msgstr ""
"プロキシサーバのパスワード (注意: 値は評価されます、/help eval を参照してくだ"
"さい)"
#, fuzzy
msgid "secured data"
msgstr "保護データ:"
msgid ""
"secured data: names and values (be careful: the values are sensitive data: "
"do NOT print/log them anywhere)"
msgstr ""
msgid "WeeChat secured data (sec.conf) | Keys: [alt-v] Toggle values"
msgstr "WeeChat の保護データ (sec.conf) | キー: [alt-v] 値のトグル"
@ -14525,3 +14534,7 @@ msgstr "%s%s: \"%s\" のタイムアウト %s"
#, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: 接続できません: 未定義のエラー (%d)"
#, fuzzy
#~ msgid "secured data: names and values"
#~ msgstr "保護データ \"%s\" を削除しました"

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-02-09 20:31+0100\n"
"POT-Creation-Date: 2021-02-25 18:40+0100\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
@ -5010,6 +5010,15 @@ msgid "password for proxy server (note: content is evaluated, see /help eval)"
msgstr ""
"hasło do serwera proxy (zawartość jest przetwarzana, zobacz /help eval)"
#, fuzzy
msgid "secured data"
msgstr "Zabezpieczone dane:"
msgid ""
"secured data: names and values (be careful: the values are sensitive data: "
"do NOT print/log them anywhere)"
msgstr ""
msgid "WeeChat secured data (sec.conf) | Keys: [alt-v] Toggle values"
msgstr ""
"Zabezpieczone dane WeeChat (sec.conf) | Klawisze: [alt-v] Przełączają "
@ -14861,3 +14870,7 @@ msgstr "%s%s: przekroczono czas na \"%s\" z %s"
#, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: nie można połączyć: niespodziewany błąd (%d)"
#, fuzzy
#~ msgid "secured data: names and values"
#~ msgstr "Usunięto zabezpieczone dane \"%s\""

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-02-09 20:31+0100\n"
"POT-Creation-Date: 2021-02-25 18:40+0100\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@ -4908,6 +4908,15 @@ msgid "password for proxy server (note: content is evaluated, see /help eval)"
msgstr ""
"palavra-passe do servidor proxy (nota:o conteúdo é avaliado, ver /help eval)"
#, fuzzy
msgid "secured data"
msgstr "Dados protegidos:"
msgid ""
"secured data: names and values (be careful: the values are sensitive data: "
"do NOT print/log them anywhere)"
msgstr ""
msgid "WeeChat secured data (sec.conf) | Keys: [alt-v] Toggle values"
msgstr ""
"Dados protegidos do WeeChat (sec.conf) | Teclas: [alt-v] Mostrar/ocultar os "
@ -14382,3 +14391,7 @@ msgstr "%s%s: tempo limite de \"%s\" com %s"
#, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: não foi possível conectar: erro inesperado (%d)"
#, fuzzy
#~ msgid "secured data: names and values"
#~ msgstr "Dados protegidos \"%s\" eliminados"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-02-09 20:31+0100\n"
"POT-Creation-Date: 2021-02-25 18:40+0100\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -4518,6 +4518,14 @@ msgstr ""
msgid "password for proxy server (note: content is evaluated, see /help eval)"
msgstr ""
msgid "secured data"
msgstr ""
msgid ""
"secured data: names and values (be careful: the values are sensitive data: "
"do NOT print/log them anywhere)"
msgstr ""
msgid "WeeChat secured data (sec.conf) | Keys: [alt-v] Toggle values"
msgstr ""
@ -12951,3 +12959,7 @@ msgstr "%s%s: tempo esgotado para \"%s\" com %s"
#, fuzzy, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: não foi possível conectar ao remetente"
#, fuzzy
#~ msgid "secured data: names and values"
#~ msgstr "Dados seguros \"%s\" deletados"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-02-09 20:31+0100\n"
"POT-Creation-Date: 2021-02-25 18:40+0100\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -3923,6 +3923,14 @@ msgstr ""
msgid "password for proxy server (note: content is evaluated, see /help eval)"
msgstr ""
msgid "secured data"
msgstr ""
msgid ""
"secured data: names and values (be careful: the values are sensitive data: "
"do NOT print/log them anywhere)"
msgstr ""
msgid "WeeChat secured data (sec.conf) | Keys: [alt-v] Toggle values"
msgstr ""
@ -12495,3 +12503,7 @@ msgstr "%s нет аргумента для параметра \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s DCC: не могу соединиться с отправителем\n"
#, fuzzy
#~ msgid "secured data: names and values"
#~ msgstr "команда users отключена"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-02-09 20:31+0100\n"
"POT-Creation-Date: 2021-02-25 18:40+0100\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -3535,6 +3535,14 @@ msgstr ""
msgid "password for proxy server (note: content is evaluated, see /help eval)"
msgstr ""
msgid "secured data"
msgstr ""
msgid ""
"secured data: names and values (be careful: the values are sensitive data: "
"do NOT print/log them anywhere)"
msgstr ""
msgid "WeeChat secured data (sec.conf) | Keys: [alt-v] Toggle values"
msgstr ""
@ -11424,3 +11432,7 @@ msgstr ""
#, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr ""
#, fuzzy
#~ msgid "secured data: names and values"
#~ msgstr "Filtre \"%s\" silindi"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-02-09 20:31+0100\n"
"POT-Creation-Date: 2021-02-25 18:40+0100\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"
@ -3524,6 +3524,14 @@ msgstr ""
msgid "password for proxy server (note: content is evaluated, see /help eval)"
msgstr ""
msgid "secured data"
msgstr ""
msgid ""
"secured data: names and values (be careful: the values are sensitive data: "
"do NOT print/log them anywhere)"
msgstr ""
msgid "WeeChat secured data (sec.conf) | Keys: [alt-v] Toggle values"
msgstr ""

View File

@ -31,6 +31,7 @@
#include "wee-config-file.h"
#include "wee-crypto.h"
#include "wee-hashtable.h"
#include "wee-hook.h"
#include "wee-secure.h"
#include "wee-secure-config.h"
#include "wee-string.h"
@ -493,6 +494,24 @@ secure_decrypt_data_not_decrypted (const char *passphrase)
return num_ok;
}
/*
* Returns secured data hashtable.
*/
struct t_hashtable *
secure_info_hashtable_secured_data_cb (const void *pointer, void *data,
const char *info_name,
struct t_hashtable *hashtable)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) info_name;
(void) hashtable;
return hashtable_dup (secure_hashtable_data);
}
/*
* Initializes secured data.
*
@ -535,6 +554,16 @@ secure_init ()
return 0;
}
/* info (hashtable) with the secured data */
hook_info_hashtable (
NULL,
"secured_data",
N_("secured data"),
NULL,
N_("secured data: names and values (be careful: the values are "
"sensitive data: do NOT print/log them anywhere)"),
&secure_info_hashtable_secured_data_cb, NULL, NULL);
return 1;
}