]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix off-by-one error when parsing id selectors
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 19 Jul 2021 11:16:03 +0000 (12:16 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 19 Jul 2021 11:16:03 +0000 (12:16 +0100)
src/libserver/css/css_selector.cxx

index 75baec8f230530186371bf39df055be3fdebbeba..86ff482feca50687e3eb987497e39a5f7c8a93da 100644 (file)
@@ -87,7 +87,7 @@ auto process_selector_tokens(rspamd_mempool_t *pool,
                                        cur_selector = std::make_unique<css_selector>(
                                                        css_selector::selector_type::SELECTOR_ID);
                                        cur_selector->value =
-                                                       parser_tok.get_string_or_default("").substr(1);
+                                                       parser_tok.get_string_or_default("");
                                        state = selector_process_state::selector_ident_consumed;
                                        break;
                                default: