summaryrefslogtreecommitdiff
path: root/lib/api/helpers/internal_helpers.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-04-05 09:29:30 +0200
committerRémy Coutable <remy@rymai.me>2017-04-10 16:10:18 +0200
commit710cd82cc16a9c67458c72ea6b2c4b676234ef79 (patch)
treef2a28252f72948c1d59ada30fe3957dacd3caf6f /lib/api/helpers/internal_helpers.rb
parent05aa038c42a64da76a419b8177ba6c7242f67687 (diff)
downloadgitlab-ce-710cd82cc16a9c67458c72ea6b2c4b676234ef79.tar.gz
Set Git-specific env in /api/internal/allowed
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/api/helpers/internal_helpers.rb')
-rw-r--r--lib/api/helpers/internal_helpers.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/helpers/internal_helpers.rb b/lib/api/helpers/internal_helpers.rb
index 2135a787b11..810e5063996 100644
--- a/lib/api/helpers/internal_helpers.rb
+++ b/lib/api/helpers/internal_helpers.rb
@@ -53,12 +53,12 @@ module API
]
end
- def parse_allowed_environment_variables
- return if params[:env].blank?
+ def parse_env
+ return {} if params[:env].blank?
JSON.parse(params[:env])
-
rescue JSON::ParserError
+ {}
end
end
end