1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

trigger: fix regex used in default triggers to hide passwords (closes #172)

"\S" is not supported on *BSD, so it is replaced by "[^ ]" (which should be
enough, since there should be no tabs or other whitespace different from
spaces in command line).

(cherry picked from commit 333253e5b9)
This commit is contained in:
Sébastien Helleu
2014-08-22 07:40:45 +02:00
parent 33a8cb5c2b
commit 73b51f9bf4
2 changed files with 8 additions and 6 deletions
+2
View File
@@ -22,6 +22,8 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
* tests: fix memory leak in tests launcher
* aspell: fix crash with command "/aspell addword" if no word is given
(closes #164, closes #165)
* trigger: fix regex used in default triggers to hide passwords ("\S" is not
supported on *BSD) (closes #172)
== Version 1.0 (2014-08-15)
+6 -6
View File
@@ -64,11 +64,11 @@ char *trigger_config_default_list[][1 + TRIGGER_NUM_OPTIONS] =
"",
"==^("
"(/(msg|quote) +nickserv "
"+(id|identify|register|ghost +\\S+|release +\\S+|regain +\\S+) +)|"
"/oper +\\S+ +|"
"+(id|identify|register|ghost +[^ ]+|release +[^ ]+|regain +[^ ]+) +)|"
"/oper +[^ ]+ +|"
"/quote +pass +|"
"/set +\\S*password\\S* +|"
"/secure +(passphrase|decrypt|set +\\S+) +)"
"/set +[^ ]*password[^ ]* +|"
"/secure +(passphrase|decrypt|set +[^ ]+) +)"
"(.*)"
"==$1$.*+",
"",
@@ -78,7 +78,7 @@ char *trigger_config_default_list[][1 + TRIGGER_NUM_OPTIONS] =
"modifier",
"5000|irc_message_auth",
"",
"==^(.*(id|identify|register|ghost +\\S+|release +\\S+) +)(.*)==$1$.*+",
"==^(.*(id|identify|register|ghost +[^ ]+|release +[^ ]+) +)(.*)==$1$.*+",
"",
"" },
/* hide server password in commands /server and /connect */
@@ -86,7 +86,7 @@ char *trigger_config_default_list[][1 + TRIGGER_NUM_OPTIONS] =
"modifier",
"5000|input_text_display;5000|history_add",
"",
"==^(/(server|connect) .*-(sasl_)?password=)(\\S+)(.*)==$1$.*4$5"
"==^(/(server|connect) .*-(sasl_)?password=)([^ ]+)(.*)==$1$.*4$5"
"",
"" },
{ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL },