mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 20:48:21 +00:00
GH-1245: require TLD of hostname literals to start with a letter
This commit is contained in:
parent
06191390c3
commit
fb85a19fa8
4 changed files with 16 additions and 1 deletions
|
@ -142,6 +142,7 @@ FILE [^ \t\n]+
|
|||
PREFIX [^ \t\n]+
|
||||
FLOAT (({D}*"."?{D})|({D}"."?{D}*))([eE][-+]?{D})?
|
||||
H [A-Za-z0-9][A-Za-z0-9\-]*
|
||||
HTLD [A-Za-z][A-Za-z0-9\-]*
|
||||
ESCSEQ (\\([^\n]|[0-7]+|x[[:xdigit:]]+))
|
||||
|
||||
%%
|
||||
|
@ -502,7 +503,7 @@ F RET_CONST(zeek::val_mgr->False()->Ref())
|
|||
|
||||
"0x"{HEX}+ RET_CONST(zeek::val_mgr->Count(static_cast<bro_uint_t>(strtoull(yytext, 0, 16))).release())
|
||||
|
||||
{H}("."{H})+ RET_CONST(zeek::detail::dns_mgr->LookupHost(yytext).release())
|
||||
({H}".")+{HTLD} RET_CONST(zeek::detail::dns_mgr->LookupHost(yytext).release())
|
||||
|
||||
\"([^\\\n\"]|{ESCSEQ})*\" {
|
||||
const char* text = yytext;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue