From 3d587ad37d8c0b93b289f2276a2ee2235e3dfbe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Thu, 25 Feb 2021 19:06:47 +0100 Subject: [PATCH] core: add info_hashtable "secured_data" --- ChangeLog.adoc | 1 + .../autogen_api_infos_hashtable.de.adoc | 2 ++ doc/docgen.py | 4 +-- .../autogen_api_infos_hashtable.en.adoc | 2 ++ .../autogen_api_infos_hashtable.fr.adoc | 2 ++ .../autogen_api_infos_hashtable.it.adoc | 2 ++ .../autogen_api_infos_hashtable.ja.adoc | 2 ++ .../autogen_api_infos_hashtable.pl.adoc | 2 ++ po/cs.po | 15 +++++++++- po/de.po | 15 +++++++++- po/es.po | 14 ++++++++- po/fr.po | 17 +++++++++-- po/hu.po | 14 ++++++++- po/it.po | 15 +++++++++- po/ja.po | 15 +++++++++- po/pl.po | 15 +++++++++- po/pt.po | 15 +++++++++- po/pt_BR.po | 14 ++++++++- po/ru.po | 14 ++++++++- po/tr.po | 14 ++++++++- po/weechat.pot | 10 ++++++- src/core/wee-secure.c | 29 +++++++++++++++++++ 22 files changed, 217 insertions(+), 16 deletions(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 5a54a0fbd..49dc18744 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -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) diff --git a/doc/de/includes/autogen_api_infos_hashtable.de.adoc b/doc/de/includes/autogen_api_infos_hashtable.de.adoc index 7cf5ad440..520192e64 100644 --- a/doc/de/includes/autogen_api_infos_hashtable.de.adoc +++ b/doc/de/includes/autogen_api_infos_hashtable.de.adoc @@ -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[] diff --git a/doc/docgen.py b/doc/docgen.py index d84c5847c..0e7eb6c9c 100644 --- a/doc/docgen.py +++ b/doc/docgen.py @@ -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), diff --git a/doc/en/includes/autogen_api_infos_hashtable.en.adoc b/doc/en/includes/autogen_api_infos_hashtable.en.adoc index 9d4b98a2b..bf8e98a98 100644 --- a/doc/en/includes/autogen_api_infos_hashtable.en.adoc +++ b/doc/en/includes/autogen_api_infos_hashtable.en.adoc @@ -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[] diff --git a/doc/fr/includes/autogen_api_infos_hashtable.fr.adoc b/doc/fr/includes/autogen_api_infos_hashtable.fr.adoc index 0a0dac804..92c31a0f2 100644 --- a/doc/fr/includes/autogen_api_infos_hashtable.fr.adoc +++ b/doc/fr/includes/autogen_api_infos_hashtable.fr.adoc @@ -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[] diff --git a/doc/it/includes/autogen_api_infos_hashtable.it.adoc b/doc/it/includes/autogen_api_infos_hashtable.it.adoc index 4589dc694..98c644ed2 100644 --- a/doc/it/includes/autogen_api_infos_hashtable.it.adoc +++ b/doc/it/includes/autogen_api_infos_hashtable.it.adoc @@ -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[] diff --git a/doc/ja/includes/autogen_api_infos_hashtable.ja.adoc b/doc/ja/includes/autogen_api_infos_hashtable.ja.adoc index b45e2b37a..3e43a6a1c 100644 --- a/doc/ja/includes/autogen_api_infos_hashtable.ja.adoc +++ b/doc/ja/includes/autogen_api_infos_hashtable.ja.adoc @@ -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[] diff --git a/doc/pl/includes/autogen_api_infos_hashtable.pl.adoc b/doc/pl/includes/autogen_api_infos_hashtable.pl.adoc index 18decc010..8dc13ceed 100644 --- a/doc/pl/includes/autogen_api_infos_hashtable.pl.adoc +++ b/doc/pl/includes/autogen_api_infos_hashtable.pl.adoc @@ -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[] diff --git a/po/cs.po b/po/cs.po index b7873f2d5..256b8f40b 100644 --- a/po/cs.po +++ b/po/cs.po @@ -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 \n" "Language-Team: weechat-dev \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" diff --git a/po/de.po b/po/de.po index 145b92ff8..ad7a805f7 100644 --- a/po/de.po +++ b/po/de.po @@ -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 \n" "Language-Team: German \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" diff --git a/po/es.po b/po/es.po index b870b2967..25dc84ee1 100644 --- a/po/es.po +++ b/po/es.po @@ -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 \n" "Language-Team: weechat-dev \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" diff --git a/po/fr.po b/po/fr.po index 902a2655b..c26e5f03e 100644 --- a/po/fr.po +++ b/po/fr.po @@ -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 \n" "Language-Team: weechat-dev \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" diff --git a/po/hu.po b/po/hu.po index eca6631fe..cb068991a 100644 --- a/po/hu.po +++ b/po/hu.po @@ -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 \n" "Language-Team: weechat-dev \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" diff --git a/po/it.po b/po/it.po index 0465ff9cb..b1b0fa481 100644 --- a/po/it.po +++ b/po/it.po @@ -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 \n" "Language-Team: weechat-dev \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" diff --git a/po/ja.po b/po/ja.po index 6bff39eb3..b24c70444 100644 --- a/po/ja.po +++ b/po/ja.po @@ -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 \n" "Language-Team: Japanese \n" "Language-Team: Polish \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\"" diff --git a/po/pt.po b/po/pt.po index ec0b70ec9..5284e7f0c 100644 --- a/po/pt.po +++ b/po/pt.po @@ -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 \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" diff --git a/po/pt_BR.po b/po/pt_BR.po index 2fe12e3c6..b007bcc5b 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: 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 \n" "Language-Team: weechat-dev \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" diff --git a/po/ru.po b/po/ru.po index 2e377e39c..7dc93f5a4 100644 --- a/po/ru.po +++ b/po/ru.po @@ -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 \n" "Language-Team: weechat-dev \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 отключена" diff --git a/po/tr.po b/po/tr.po index 4568f57ed..6500877ac 100644 --- a/po/tr.po +++ b/po/tr.po @@ -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 \n" "Language-Team: weechat-dev \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" diff --git a/po/weechat.pot b/po/weechat.pot index a7936f3a8..33daa8eef 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: 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 \n" "Language-Team: weechat-dev \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 "" diff --git a/src/core/wee-secure.c b/src/core/wee-secure.c index 33b3ce010..928454cb7 100644 --- a/src/core/wee-secure.c +++ b/src/core/wee-secure.c @@ -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; }