]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Allow && and || in composites.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 15 Feb 2015 17:46:19 +0000 (17:46 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 15 Feb 2015 17:46:19 +0000 (17:46 +0000)
src/libmime/expressions.c

index d1a5df4e9dca9337975f1c47ef4e1a6002a2c43d..07253a2bc5c6eaa396f3fdcabb408ecea81bae4c 100644 (file)
@@ -256,7 +256,13 @@ op_to_char (gchar *a, gchar **next)
        case '|':
        case '(':
        case ')':
-               *next = a + 1;
+               if ((a[0] == '&' && a[1] == '&') ||
+                               (a[0] == '|' && a[1] == '|')) {
+                       *next = a + 2;
+               }
+               else {
+                       *next = a + 1;
+               }
                return *a;
        case 'O':
        case 'o':