meanmail-dev / nginx-intellij-plugin

Intellij Plugin for Nginx configuration file
https://meanmail.dev/plugin/7
MIT License
56 stars 6 forks source link

lack of support for `set_by_lua_block $foo` blocks #18

Open beetrootpaul opened 3 months ago

beetrootpaul commented 3 months ago

Describe the bug

set_by_lua_block $foo syntax is not supported

To Reproduce

Use a snippet like this:

set $foo "";
set_by_lua_block $foo {
  -- potentially some interesting logic here instead of just the simple return below
  return "bar"
}

Expected behavior

Lua injection should be detected for this set_by_lua_block

IDE:

Plugin (please complete the following information. See Main Menu -> File -> Settings -> Plugins):

Additional context

I lack know-how about nginx and Lua. I use set_by_lua_block $foo { … } syntax, because it is already present in files I have to work on. I might just not know about some alternative idiomatic approach of setting nginx vars out of Lua blocks.