Managesieve: Use RFC-compliant line endings, CRLF instead of LF (#6686)

pull/6724/head
Aleksander Machniak 6 years ago
parent d8470c6c2b
commit ccb70116f1

@ -16,6 +16,7 @@ CHANGELOG Roundcube Webmail
- Elastic: Fix folders list scrolling on touch devices (#6706) - Elastic: Fix folders list scrolling on touch devices (#6706)
- Elastic: Fix non-working pretty selects in Chrome browser (#6705) - Elastic: Fix non-working pretty selects in Chrome browser (#6705)
- Managesieve: Fix bug where global includes were requested for vacation (#6716) - Managesieve: Fix bug where global includes were requested for vacation (#6716)
- Managesieve: Use RFC-compliant line endings, CRLF instead of LF (#6686)
- Fix bug in HTML parser that could cause missing text fragments when there was no head/body tag (#6713) - Fix bug in HTML parser that could cause missing text fragments when there was no head/body tag (#6713)
- Fix bug where HTML messages with a xml:namespace tag were not rendered (#6697) - Fix bug where HTML messages with a xml:namespace tag were not rendered (#6697)
- Fix TinyMCE download location (#6694) - Fix TinyMCE download location (#6694)

@ -1,3 +1,4 @@
- Use RFC-compliant line endings, CRLF instead of LF (#6686)
- Fix bug where global includes were requested for vacation (#6716) - Fix bug where global includes were requested for vacation (#6716)
* version 9.2 [2018-11-08] * version 9.2 [2018-11-08]

@ -196,14 +196,14 @@ class rcube_sieve_script
foreach ($this->vars as $var) { foreach ($this->vars as $var) {
if (empty($has_vars)) { if (empty($has_vars)) {
// 'variables' extension not supported, put vars in comments // 'variables' extension not supported, put vars in comments
$output .= sprintf("# %s %s\n", $var['name'], $var['value']); $output .= sprintf("# %s %s\r\n", $var['name'], $var['value']);
} }
else { else {
$output .= 'set '; $output .= 'set ';
foreach (array_diff(array_keys($var), array('name', 'value')) as $opt) { foreach (array_diff(array_keys($var), array('name', 'value')) as $opt) {
$output .= ":$opt "; $output .= ":$opt ";
} }
$output .= self::escape_string($var['name']) . ' ' . self::escape_string($var['value']) . ";\n"; $output .= self::escape_string($var['name']) . ' ' . self::escape_string($var['value']) . ";\r\n";
} }
} }
} }
@ -219,7 +219,7 @@ class rcube_sieve_script
// header // header
if (!empty($rule['name']) && strlen($rule['name'])) { if (!empty($rule['name']) && strlen($rule['name'])) {
$script .= '# rule:[' . $rule['name'] . "]\n"; $script .= '# rule:[' . $rule['name'] . "]\r\n";
} }
// constraints expressions // constraints expressions
@ -379,7 +379,7 @@ class rcube_sieve_script
else { else {
$script .= $tests_str; $script .= $tests_str;
} }
$script .= "\n{\n"; $script .= "\r\n{\r\n";
} }
// action(s) // action(s)
@ -548,13 +548,13 @@ class rcube_sieve_script
if ($action_script) { if ($action_script) {
$script .= !empty($tests) ? "\t" : ''; $script .= !empty($tests) ? "\t" : '';
$script .= $action_script . ";\n"; $script .= $action_script . ";\r\n";
} }
} }
} }
if ($script) { if ($script) {
$output .= $script . (!empty($tests) ? "}\n" : ''); $output .= $script . (!empty($tests) ? "}\r\n" : '');
$idx++; $idx++;
} }
} }
@ -569,11 +569,11 @@ class rcube_sieve_script
sort($exts); // for convenience use always the same order sort($exts); // for convenience use always the same order
$output = 'require ["' . implode('","', $exts) . "\"];\n" . $output; $output = 'require ["' . implode('","', $exts) . "\"];\r\n" . $output;
} }
if (!empty($this->prefix)) { if (!empty($this->prefix)) {
$output = $this->prefix . "\n\n" . $output; $output = $this->prefix . "\r\n\r\n" . $output;
} }
return $output; return $output;
@ -678,7 +678,7 @@ class rcube_sieve_script
} }
if (!empty($prefix)) { if (!empty($prefix)) {
$this->prefix = trim($prefix); $this->prefix = trim(preg_replace('/\r?\n/', "\r\n", $prefix));
} }
} }
@ -1203,7 +1203,7 @@ class rcube_sieve_script
// multi-line string // multi-line string
if (preg_match('/[\r\n\0]/', $str)) { if (preg_match('/[\r\n\0]/', $str)) {
return sprintf("text:\n%s\n.\n", self::escape_multiline_string($str)); return sprintf("text:\r\n%s\r\n.\r\n", self::escape_multiline_string($str));
} }
// quoted-string // quoted-string
else { else {
@ -1394,7 +1394,7 @@ class rcube_sieve_script
// remove dot-stuffing // remove dot-stuffing
$text = str_replace("\n..", "\n.", $text); $text = str_replace("\n..", "\n.", $text);
$result[] = $text; $result[] = rtrim($text, "\r\n");
$position++; $position++;
} }
} }

@ -12,11 +12,13 @@ class Tokenizer extends PHPUnit_Framework_TestCase
{ {
return array( return array(
array(1, "text: #test\nThis is test ; message;\nMulti line\n.\n;\n", '"This is test ; message;\nMulti line"'), array(1, "text: #test\nThis is test ; message;\nMulti line\n.\n;\n", '"This is test ; message;\nMulti line"'),
array(1, "text: #test\r\nThis is test ; message;\nMulti line\r\n.\r\n;", '"This is test ; message;\nMulti line"'),
array(0, '["test1","test2"]', '[["test1","test2"]]'), array(0, '["test1","test2"]', '[["test1","test2"]]'),
array(1, '["test"]', '["test"]'), array(1, '["test"]', '["test"]'),
array(1, '"te\\"st"', '"te\\"st"'), array(1, '"te\\"st"', '"te\\"st"'),
array(0, 'test #comment', '["test"]'), array(0, 'test #comment', '["test"]'),
array(0, "text:\ntest\n.\ntext:\ntest\n.\n", '["test","test"]'), array(0, "text:\ntest\n.\ntext:\ntest\n.\n", '["test","test"]'),
array(0, "text:\r\ntest\r\n.\r\ntext:\r\ntest\r\n.\r\n", '["test","test"]'),
array(1, '"\\a\\\\\\"a"', '"a\\\\\\"a"'), array(1, '"\\a\\\\\\"a"', '"a\\\\\\"a"'),
); );
} }

@ -63,4 +63,3 @@ class Managesieve_Vacation extends PHPUnit_Framework_TestCase
$this->assertSame('05 Mar 2014', $result['to']); $this->assertSame('05 Mar 2014', $result['to']);
} }
} }

@ -1,58 +1,58 @@
require ["envelope","fileinto","reject"]; require ["envelope","fileinto","reject"];
# rule:[spam] # rule:[spam]
if header :contains "X-DSPAM-Result" "Spam" if header :contains "X-DSPAM-Result" "Spam"
{ {
fileinto "Spam"; fileinto "Spam";
stop; stop;
} }
# rule:[test1] # rule:[test1]
if header :contains ["From","To"] "test@domain.tld" if header :contains ["From","To"] "test@domain.tld"
{ {
discard; discard;
stop; stop;
} }
# rule:[test2] # rule:[test2]
if anyof (not header :contains :comparator "i;octet" "Subject" "[test]", header :contains "Subject" "[test2]") if anyof (not header :contains :comparator "i;octet" "Subject" "[test]", header :contains "Subject" "[test2]")
{ {
fileinto "test"; fileinto "test";
stop; stop;
} }
# rule:[comments] # rule:[comments]
if true if true
{ {
stop; stop;
} }
# rule:[reject] # rule:[reject]
if size :over 5000K if size :over 5000K
{ {
reject "Message over 5MB size limit. Please contact me before sending this."; reject "Message over 5MB size limit. Please contact me before sending this.";
} }
# rule:[false] # rule:[false]
if false # size :over 5000K if false # size :over 5000K
{ {
stop; stop;
} }
# rule:[true] # rule:[true]
if true if true
{ {
stop; stop;
} }
fileinto "Test"; fileinto "Test";
# rule:[address test] # rule:[address test]
if address :is "From" "nagios@domain.tld" if address :is "From" "nagios@domain.tld"
{ {
fileinto "domain.tld"; fileinto "domain.tld";
stop; stop;
} }
# rule:[envelope test] # rule:[envelope test]
if envelope :domain :is "From" "domain.tld" if envelope :domain :is "From" "domain.tld"
{ {
fileinto "domain.tld"; fileinto "domain.tld";
stop; stop;
} }
# rule:[do not wrap long lines] # rule:[do not wrap long lines]
if envelope :domain :is "From" "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" if envelope :domain :is "From" "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
{ {
fileinto "domain.tld"; fileinto "domain.tld";
stop; stop;
} }

@ -1,17 +1,17 @@
require ["body","fileinto"]; require ["body","fileinto"];
if body :raw :contains "MAKE MONEY FAST" if body :raw :contains "MAKE MONEY FAST"
{ {
stop; stop;
} }
if body :content "text" :contains ["missile","coordinates"] if body :content "text" :contains ["missile","coordinates"]
{ {
fileinto "secrets"; fileinto "secrets";
} }
if body :content "audio/mp3" :contains "" if body :content "audio/mp3" :contains ""
{ {
fileinto "jukebox"; fileinto "jukebox";
} }
if body :text :contains "project schedule" if body :text :contains "project schedule"
{ {
fileinto "project/schedule"; fileinto "project/schedule";
} }

@ -1,10 +1,10 @@
require ["envelope","fileinto","imap4flags","subaddress"]; require ["envelope","fileinto","imap4flags","subaddress"];
if envelope :detail "to" "addressextension" if envelope :detail "to" "addressextension"
{ {
setflag "\\Flagged"; setflag "\\Flagged";
} }
if header :is "X-Spam-Flag" "YES" if header :is "X-Spam-Flag" "YES"
{ {
fileinto "Junk"; fileinto "Junk";
stop; stop;
} }

@ -1,21 +1,21 @@
require ["comparator-i;ascii-numeric","date","fileinto","relational"]; require ["comparator-i;ascii-numeric","date","fileinto","relational"];
# rule:[date] # rule:[date]
if allof (date :originalzone :value "ge" :comparator "i;ascii-numeric" "date" "hour" "09") if allof (date :originalzone :value "ge" :comparator "i;ascii-numeric" "date" "hour" "09")
{ {
fileinto "urgent"; fileinto "urgent";
} }
# rule:[date-weekday] # rule:[date-weekday]
if date :is "received" "weekday" "0" if date :is "received" "weekday" "0"
{ {
fileinto "weekend"; fileinto "weekend";
} }
# rule:[date-zone] # rule:[date-zone]
if date :zone "-0500" :value "gt" :comparator "i;ascii-numeric" "received" "iso8601" "2007-02-26T09:00:00-05:00" if date :zone "-0500" :value "gt" :comparator "i;ascii-numeric" "received" "iso8601" "2007-02-26T09:00:00-05:00"
{ {
stop; stop;
} }
# rule:[currentdate] # rule:[currentdate]
if anyof (currentdate :is "weekday" "0", currentdate :value "lt" :comparator "i;ascii-numeric" "hour" "09", currentdate :value "ge" :comparator "i;ascii-numeric" "date" "2007-06-30") if anyof (currentdate :is "weekday" "0", currentdate :value "lt" :comparator "i;ascii-numeric" "hour" "09", currentdate :value "ge" :comparator "i;ascii-numeric" "date" "2007-06-30")
{ {
stop; stop;
} }

@ -1,16 +1,16 @@
require ["duplicate","fileinto"]; require ["duplicate","fileinto"];
# rule:[test-duplicate] # rule:[test-duplicate]
if duplicate if duplicate
{ {
fileinto "urgent"; fileinto "urgent";
} }
# rule:[test-duplicate-2] # rule:[test-duplicate-2]
if allof (duplicate :handle "support" :header "X-Ticket-ID", header :contains "subject" "fileserver") if allof (duplicate :handle "support" :header "X-Ticket-ID", header :contains "subject" "fileserver")
{ {
fileinto "test"; fileinto "test";
} }
# rule:[test-duplicate-3] # rule:[test-duplicate-3]
if not duplicate :uniqueid "test" :seconds 1800 if not duplicate :uniqueid "test" :seconds 1800
{ {
discard; discard;
} }

@ -1,36 +1,36 @@
require ["editheader"]; require ["editheader"];
# rule:[test-addheader1] # rule:[test-addheader1]
if true if true
{ {
addheader "X-Sieve-Filtered" "<test@test.com>"; addheader "X-Sieve-Filtered" "<test@test.com>";
} }
# rule:[test-addheader2] # rule:[test-addheader2]
if not header :contains "X-Sieve-Filtered" "<test@test.com>" if not header :contains "X-Sieve-Filtered" "<test@test.com>"
{ {
addheader :last "X-Sieve-Filtered" "<test@test.com>"; addheader :last "X-Sieve-Filtered" "<test@test.com>";
} }
# rule:[test-deleteheader1] # rule:[test-deleteheader1]
if true if true
{ {
deleteheader :index 1 :contains "Delivered-To" ["bob@example.com","test@test.com"]; deleteheader :index 1 :contains "Delivered-To" ["bob@example.com","test@test.com"];
} }
# rule:[test-deleteheader2] # rule:[test-deleteheader2]
if true if true
{ {
deleteheader :index 2 :last :contains :comparator "i;octet" "Delivered-To" "test@test.com"; deleteheader :index 2 :last :contains :comparator "i;octet" "Delivered-To" "test@test.com";
} }
# rule:[test-deleteheader3] # rule:[test-deleteheader3]
if true if true
{ {
deleteheader "Delivered-To"; deleteheader "Delivered-To";
} }
# rule:[test-deleteheader4] # rule:[test-deleteheader4]
if true if true
{ {
deleteheader :index 3 :last :contains "Delivered-To"; deleteheader :index 3 :last :contains "Delivered-To";
} }
# rule:[test-deleteheader5] # rule:[test-deleteheader5]
if true if true
{ {
deleteheader "Delivered-To" "test"; deleteheader "Delivered-To" "test";
} }

@ -1,19 +1,18 @@
require ["enotify","variables"]; require ["enotify","variables"];
# rule:[notify1] # rule:[notify1]
if header :contains "from" "boss@example.org" if header :contains "from" "boss@example.org"
{ {
notify :importance "1" :message "This is probably very important" "mailto:alm@example.com"; notify :importance "1" :message "This is probably very important" "mailto:alm@example.com";
stop; stop;
} }
# rule:[subject] # rule:[subject]
if header :matches "Subject" "*" if header :matches "Subject" "*"
{ {
set "subject" "${1}"; set "subject" "${1}";
} }
# rule:[from notify2] # rule:[from notify2]
if header :matches "From" "*" if header :matches "From" "*"
{ {
set "from" "${1}"; set "from" "${1}";
notify :importance "3" :message "${from}: ${subject}" "mailto:alm@example.com"; notify :importance "3" :message "${from}: ${subject}" "mailto:alm@example.com";
} }

@ -1,18 +1,18 @@
require ["enotify","envelope","variables"]; require ["enotify","envelope","variables"];
# rule:[from] # rule:[from]
if envelope :matches "from" "*" if envelope :matches "from" "*"
{ {
set "env_from" " [really: ${1}]"; set "env_from" " [really: ${1}]";
} }
# rule:[subject] # rule:[subject]
if header :matches "Subject" "*" if header :matches "Subject" "*"
{ {
set "subject" "${1}"; set "subject" "${1}";
} }
# rule:[from notify] # rule:[from notify]
if address :matches "from" "*" if address :matches "from" "*"
{ {
set "from_addr" "${1}"; set "from_addr" "${1}";
notify :message "${from_addr}${env_from}: ${subject}" "mailto:alm@example.com"; notify :message "${from_addr}${env_from}: ${subject}" "mailto:alm@example.com";
} }

@ -1,7 +1,7 @@
require ["imap4flags"]; require ["imap4flags"];
# rule:[imapflags] # rule:[imapflags]
if header :matches "Subject" "^Test$" if header :matches "Subject" "^Test$"
{ {
setflag "\\Seen"; setflag "\\Seen";
addflag ["\\Answered","\\Deleted"]; addflag ["\\Answered","\\Deleted"];
} }

@ -1,7 +1,7 @@
require ["include"]; require ["include"];
include "script.sieve"; include "script.sieve";
# rule:[two] # rule:[two]
if true if true
{ {
include :optional "second.sieve"; include :optional "second.sieve";
} }

@ -1,24 +1,24 @@
require ["comparator-i;ascii-numeric","date","fileinto","index","relational"]; require ["comparator-i;ascii-numeric","date","fileinto","index","relational"];
# rule:[index-header1] # rule:[index-header1]
if header :index 1 :last :contains "X-DSPAM-Result" "Spam" if header :index 1 :last :contains "X-DSPAM-Result" "Spam"
{ {
fileinto "Spam"; fileinto "Spam";
stop; stop;
} }
# rule:[index-header2] # rule:[index-header2]
if header :index 2 :contains ["From","To"] "test@domain.tld" if header :index 2 :contains ["From","To"] "test@domain.tld"
{ {
discard; discard;
stop; stop;
} }
# rule:[index-address] # rule:[index-address]
if address :index 1 :is "From" "nagios@domain.tld" if address :index 1 :is "From" "nagios@domain.tld"
{ {
fileinto "domain.tld"; fileinto "domain.tld";
stop; stop;
} }
# rule:[index-date] # rule:[index-date]
if date :index 1 :last :zone "-0500" :value "gt" :comparator "i;ascii-numeric" "received" "iso8601" "2007-02-26T09:00:00-05:00" if date :index 1 :last :zone "-0500" :value "gt" :comparator "i;ascii-numeric" "received" "iso8601" "2007-02-26T09:00:00-05:00"
{ {
stop; stop;
} }

@ -1,3 +1,3 @@
require ["variables"]; require ["variables"];
set "EDITOR" "Roundcube"; set "EDITOR" "Roundcube";
set "EDITOR_VERSION" "123"; set "EDITOR_VERSION" "123";

@ -1,10 +1,10 @@
# Sieve Filter # Sieve Filter
# Erzeugt von Ingo (http://www.horde.org/ingo/) (30.09.2016, 16:02) # Erzeugt von Ingo (http://www.horde.org/ingo/) (30.09.2016, 16:02)
# Nested rules aren't supported and will be ignored (#5540) # Nested rules aren't supported and will be ignored (#5540)
# rule:[Ausgeschlossene Adressen] # rule:[Ausgeschlossene Adressen]
if address :is ["From","Sender","Resent-From"] "noreply@example.org" if address :is ["From","Sender","Resent-From"] "noreply@example.org"
{ {
discard; discard;
stop; stop;
} }

@ -1,18 +1,18 @@
require ["notify","variables"]; require ["notify","variables"];
# rule:[notify1] # rule:[notify1]
if header :contains "from" "boss@example.org" if header :contains "from" "boss@example.org"
{ {
notify :low :message "This is probably very important"; notify :low :message "This is probably very important";
stop; stop;
} }
# rule:[subject] # rule:[subject]
if header :matches "Subject" "*" if header :matches "Subject" "*"
{ {
set "subject" "${1}"; set "subject" "${1}";
} }
# rule:[from notify2] # rule:[from notify2]
if header :matches "From" "*" if header :matches "From" "*"
{ {
set "from" "${1}"; set "from" "${1}";
notify :high :method "mailto" :options "test@example.org" :message "${from}: ${subject}"; notify :high :method "mailto" :options "test@example.org" :message "${from}: ${subject}";
} }

@ -1,17 +1,17 @@
require ["envelope","notify","variables"]; require ["envelope","notify","variables"];
# rule:[from] # rule:[from]
if envelope :matches "from" "*" if envelope :matches "from" "*"
{ {
set "env_from" " [really: ${1}]"; set "env_from" " [really: ${1}]";
} }
# rule:[subject] # rule:[subject]
if header :matches "Subject" "*" if header :matches "Subject" "*"
{ {
set "subject" "${1}"; set "subject" "${1}";
} }
# rule:[from notify] # rule:[from notify]
if address :matches "from" "*" if address :matches "from" "*"
{ {
set "from_addr" "${1}"; set "from_addr" "${1}";
notify :method "sms" :options "1234567890" :message "${from_addr}${env_from}: ${subject}"; notify :method "sms" :options "1234567890" :message "${from_addr}${env_from}: ${subject}";
} }

@ -1,5 +1,5 @@
# this is a comment # this is a comment
# and the second line # and the second line
require ["variables"]; require ["variables"];
set "b" "c"; set "b" "c";

@ -1,6 +1,6 @@
require ["comparator-i;ascii-numeric","relational"]; require ["comparator-i;ascii-numeric","relational"];
# rule:[redirect] # rule:[redirect]
if header :value "ge" :comparator "i;ascii-numeric" "X-Spam-score" "14" if header :value "ge" :comparator "i;ascii-numeric" "X-Spam-score" "14"
{ {
redirect "test@test.tld"; redirect "test@test.tld";
} }

@ -1,11 +1,11 @@
require ["envelope","fileinto","subaddress"]; require ["envelope","fileinto","subaddress"];
if envelope :user "To" "postmaster" if envelope :user "To" "postmaster"
{ {
fileinto "postmaster"; fileinto "postmaster";
stop; stop;
} }
if envelope :detail :is "To" "mta-filters" if envelope :detail :is "To" "mta-filters"
{ {
fileinto "mta-filters"; fileinto "mta-filters";
stop; stop;
} }

@ -1,14 +1,14 @@
require ["vacation"]; require ["vacation"];
# rule:[test-vacation] # rule:[test-vacation]
if header :contains "Subject" "vacation" if header :contains "Subject" "vacation"
{ {
vacation :days 1 text: vacation :days 1 text:
# test # test
test test /* test */ test test /* test */
.. ..
..test ..test
test test
. .
; ;
stop; stop;
} }

@ -1,12 +1,12 @@
require ["vacation-seconds"]; require ["vacation-seconds"];
# rule:[test-vacation] # rule:[test-vacation]
if header :contains "Subject" "vacation" if header :contains "Subject" "vacation"
{ {
vacation :seconds 0 text: vacation :seconds 0 text:
# test # test
test test /* test */ test test /* test */
test test
. .
; ;
stop; stop;
} }

@ -1,24 +1,24 @@
require ["variables"]; require ["variables"];
set "honorific" "Mr"; set "honorific" "Mr";
set "vacation" text: set "vacation" text:
Dear ${HONORIFIC} ${last_name}, Dear ${HONORIFIC} ${last_name},
I am out, please leave a message after the meep. I am out, please leave a message after the meep.
. .
; ;
set :length "b" "${a}"; set :length "b" "${a}";
set :lower "b" "${a}"; set :lower "b" "${a}";
set :upperfirst "b" "${a}"; set :upperfirst "b" "${a}";
set :upperfirst :lower "b" "${a}"; set :upperfirst :lower "b" "${a}";
set :quotewildcard "b" "Rock*"; set :quotewildcard "b" "Rock*";
if string :matches " ${state} " "* pending *" if string :matches " ${state} " "* pending *"
{ {
set "test1" "*"; set "test1" "*";
} }
if string ["aaa","bbb"] ["aaa","bbb"] if string ["aaa","bbb"] ["aaa","bbb"]
{ {
set "test2" "*"; set "test2" "*";
} }
if string :is :comparator "i;octet" "bbb" "bbb" if string :is :comparator "i;octet" "bbb" "bbb"
{ {
set "test3" "*"; set "test3" "*";
} }

Loading…
Cancel
Save