Skip to content

Commit

Permalink
wizard: only alow valid osm types in 'type:…' filter; closes #681
Browse files Browse the repository at this point in the history
i.e. type:node, type:way, or type:relation are the only allowed variants of this filter
  • Loading branch information
tyrasd committed Jan 15, 2024
1 parent 6de7646 commit 9cc1d47
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions js/ffs/ffs.pegjs
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,16 @@ key_not_like_val
{ return { query:"notlike", key:x, val:y.regex?y:{regex:y} } }

key_substr_val
= x:string _ ( ":" ) _ y:string
= x:string & { return x !== "type" } _ ( ":" ) _ y:string
{ return { query:"substr", key:x, val:y } }

type
= "type" _ ":" _ x:string
= "type" _ ":" _ x:osm_type
{ return { query:"type", type:x } }

osm_type
= "node" / "way" / "relation"

meta // TODO?
= x:("user" / "uid" / "newer" / "id") _ ":" _ y:string
{ return { query:"meta", meta:x, val:y } }
Expand Down

0 comments on commit 9cc1d47

Please sign in to comment.