aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/rcl/rcl_parser.c16
-rw-r--r--test/rspamd_rcl_test.c1
2 files changed, 3 insertions, 14 deletions
diff --git a/src/rcl/rcl_parser.c b/src/rcl/rcl_parser.c
index 1b09fe283..ac63298c9 100644
--- a/src/rcl/rcl_parser.c
+++ b/src/rcl/rcl_parser.c
@@ -91,19 +91,7 @@ start:
}
}
else if (*p == '/' && chunk->remain >= 2) {
- if (p[1] == '/' && parser->state != RSPAMD_RCL_STATE_SCOMMENT &&
- parser->state != RSPAMD_RCL_STATE_MCOMMENT) {
- rspamd_cl_chunk_skipc (chunk, *++p);
- chunk->pos = p;
- while (p < chunk->end) {
- if (*p == '\n') {
- rspamd_cl_chunk_skipc (chunk, *++p);
- goto start;
- }
- rspamd_cl_chunk_skipc (chunk, *++p);
- }
- }
- else if (p[1] == '*') {
+ if (p[1] == '*') {
rspamd_cl_chunk_skipc (chunk, *++p);
comments_nested ++;
rspamd_cl_chunk_skipc (chunk, *++p);
@@ -213,7 +201,7 @@ static inline gboolean
rspamd_cl_lex_is_comment (const guchar c1, const guchar c2)
{
if (c1 == '/') {
- if (c2 == '/' || c2 == '*') {
+ if (c2 == '*') {
return TRUE;
}
}
diff --git a/test/rspamd_rcl_test.c b/test/rspamd_rcl_test.c
index 9d8399baf..2a93169a6 100644
--- a/test/rspamd_rcl_test.c
+++ b/test/rspamd_rcl_test.c
@@ -53,6 +53,7 @@ const gchar *rcl_test_valid[] = {
""
"#packagesite http//pkg.freebsd.org/freebsd-9-amd64/latest\n"
"#packagesite http//pkg.freebsd.org/freebsd-9-amd64/latest\n"
+ "packagesite: http//pkg.freebsd.org/freebsd-9-amd64/latest\n"
"ALIAS : {\n"
" all-depends: query %dn-%dv,\n"
" annotations: info -A,\n"