1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 23:36:37 +02:00

trigger: hide key and password in command "/msg nickserv setpass nick key password"

This commit is contained in:
Sébastien Helleu
2021-11-13 15:41:31 +01:00
parent 50edb33f1c
commit 05d31b476b
4 changed files with 18 additions and 9 deletions
+1
View File
@@ -26,6 +26,7 @@ New features::
* api: add user variables in evaluation of expressions with "define:name,value"
* api: add IRC message parameters "param1" to "paramN" and "num_params" in output of irc_message_parse
* irc: allow quotes around IRC message in command /server fakerecv
* trigger: hide key and password in command "/msg nickserv setpass nick key password"
* trigger: add support of option "-server" when hiding passwords in command /msg nickserv register
Bug fixes::
+8 -8
View File
@@ -20,17 +20,17 @@ https://weechat.org/files/changelog/ChangeLog-devel.html[ChangeLog]
[[v3.4]]
== Version 3.4 (under dev)
[[v3.4_trigger_cmd_pass_register]]
=== Default trigger "cmd_pass_register"
[[v3.4_default_triggers]]
=== Default triggers
The trigger "cmd_pass_register" has been updated to support option
`-server <name>` in commands `/msg` and `/quote`.
The existing triggers "cmd_pass" and "cmd_pass_register" have been updated to
hide key and password in command `/msg nickserv setpass <nick> <key> <password>`
and support the option `-server <name>`.
You can restore the default trigger "cmd_pass_register" with the following
command:
You can restore the default triggers with the following command:
----
/trigger restore cmd_pass_register
/trigger restore cmd_pass cmd_pass_register
----
[[v3.4_hdata_search]]
@@ -996,7 +996,7 @@ Or set explicitly the value:
The existing triggers "cmd_pass" and "msg_auth" have been updated to hide
password in command `/msg nickserv set password` and support the option
`-server xxx`.
`-server <name>`.
You can restore the default triggers with the following command:
+3 -1
View File
@@ -77,6 +77,7 @@ char *trigger_config_default_list[][1 + TRIGGER_NUM_OPTIONS] =
* - /msg [-server <name>] nickserv release <nick> <password>
* - /msg [-server <name>] nickserv regain <nick> <password>
* - /msg [-server <name>] nickserv recover <nick> <password>
* - /msg [-server <name>] nickserv setpass <nick> <key> <password>
* - /oper <nick> <password>
* - /quote pass <password>
* - /secure passphrase <passphrase>
@@ -95,7 +96,8 @@ char *trigger_config_default_list[][1 + TRIGGER_NUM_OPTIONS] =
"ghost +[^ ]+|"
"release +[^ ]+|"
"regain +[^ ]+|"
"recover +[^ ]+"
"recover +[^ ]+|"
"setpass +[^ ]+"
") +)|"
"/oper +[^ ]+ +|"
"/quote +pass +|"
@@ -170,6 +170,12 @@ TEST(TriggerConfig, DefaultTriggerCmdPass)
WEE_CHECK_MODIFIER_INPUT("/msg nickserv recover alice ******",
"/msg nickserv recover alice secret");
/* /msg nickserv setpass <nick> <key> <password> */
WEE_CHECK_MODIFIER_INPUT("/msg nickserv setpass alice",
"/msg nickserv setpass alice");
WEE_CHECK_MODIFIER_INPUT("/msg nickserv setpass alice **********",
"/msg nickserv setpass alice key secret");
/* /oper <nick> <password> */
WEE_CHECK_MODIFIER_INPUT("/oper alice",
"/oper alice");