From c23fc05df86c3cdb8eb40994b98d057f4a81b02d Mon Sep 17 00:00:00 2001 From: =?utf8?q?K=C3=A9vin=20Gomez?= Date: Sun, 18 Oct 2015 14:32:58 +0200 Subject: [PATCH] Validate used operators when creating tagging rules --- src/Wallabag/CoreBundle/Entity/TaggingRule.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Wallabag/CoreBundle/Entity/TaggingRule.php b/src/Wallabag/CoreBundle/Entity/TaggingRule.php index 97a29336..472ae582 100644 --- a/src/Wallabag/CoreBundle/Entity/TaggingRule.php +++ b/src/Wallabag/CoreBundle/Entity/TaggingRule.php @@ -28,7 +28,10 @@ class TaggingRule * @var string * * @Assert\NotBlank() - * @RulerZAssert\ValidRule(allowed_variables={"title", "url", "isArchived", "isStared", "content", "language", "mimetype", "readingTime", "domainName"}) + * @RulerZAssert\ValidRule( + * allowed_variables={"title", "url", "isArchived", "isStared", "content", "language", "mimetype", "readingTime", "domainName"}, + * allowed_operators={">", "<", ">=", "<=", "=", "is", "!=", "and", "not", "or"} + * ) * @ORM\Column(name="rule", type="string", nullable=false) */ private $rule; -- 2.41.0