Changeset

3525:8c1a3b989990

mod_pubsub_github: Rename variable to avoid name clash [luacheck]
author Kim Alvefur <zash@zash.se>
date Sun, 31 Mar 2019 18:31:57 +0200
parents 3524:a7a751e57f32
children 3526:bcfd6e5bb0f5
files mod_pubsub_github/mod_pubsub_github.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mod_pubsub_github/mod_pubsub_github.lua	Sun Mar 31 18:31:38 2019 +0200
+++ b/mod_pubsub_github/mod_pubsub_github.lua	Sun Mar 31 18:31:57 2019 +0200
@@ -18,10 +18,10 @@
 local node_prefix = module:get_option_string("github_node_prefix", "github/");
 local node_mapping = module:get_option_string("github_node_mapping");
 local github_actor = module:get_option_string("github_actor") or true;
-local secret = module:get_option("github_secret");
+local github_secret = module:get_option("github_secret");
 
 -- validation
-assert(secret, "Please set 'github_secret'");
+assert(github_secret, "Please set 'github_secret'");
 
 local error_mapping = {
 	["forbidden"] = 403;
@@ -42,7 +42,7 @@
 function handle_POST(event)
 	local request, response = event.request, event.response;
 
-	if not verify_signature(secret, request.body, request.headers.x_hub_signature) then
+	if not verify_signature(github_secret, request.body, request.headers.x_hub_signature) then
 		module:log("debug", "Signature validation failed");
 		return 401;
 	end