Skip to content

Commit

Permalink
feat(cli) explicitly set kong env as user read-only (Kong#2611)
Browse files Browse the repository at this point in the history
  • Loading branch information
p0pr0ck5 authored and thibaultcha committed Jun 8, 2017
1 parent 4c62db0 commit 9952498
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kong/cmd/utils/prefix_handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,12 @@ local function prepare_prefix(kong_config, nginx_custom_template_path)

pl_file.write(kong_config.kong_env, table.concat(buf, "\n"))

-- ... yeah this sucks. thanks fwrite.
local ok, _, _, err = pl_utils.executeex("chmod 640 " .. kong_config.kong_env)
if not ok then
log.warn("Unable to set kong env permissions: ", err)
end

return true
end

Expand Down

0 comments on commit 9952498

Please sign in to comment.