Skip to content

Commit

Permalink
Fixes security breach, adds LOGGED_COMPONent to message
Browse files Browse the repository at this point in the history
  • Loading branch information
jbonnet committed Jan 2, 2020
1 parent f7fd065 commit 60fa403
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tng-router/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ source 'https://rubygems.org'
ruby '2.4.3'

gem 'rake', '12.3.0'
gem 'rack', '2.0.6'
gem 'rack', '2.0.8'
gem 'rack-uploads', '0.2.1'
gem 'sinatra', '2.0.2', require: 'sinatra/base'
gem 'sinatra-contrib', '2.0.2', require: false
gem 'faraday', '0.14.0'
gem 'curb', '0.9.3'

gem 'puma', '3.11.0'
gem 'puma', '3.12.2'
gem 'tng-gtk-utils', '0.5.1'
gem 'ci_reporter_rspec', '1.0.0'
gem 'rubocop', '0.52.0'
Expand Down
4 changes: 2 additions & 2 deletions tng-router/lib/middlewares/authentication.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def call(env)

env['5gtango.user.name'] = find_user_name_by_token(token: decoded_token)
env['5gtango.user.email'] = find_user_email_by_token(token: decoded_token)
STDERR.puts ">>>>>> User name=#{env['5gtango.user.name']}, user email=#{env['5gtango.user.email']}"
STDERR.puts ">>>>>> #{LOGGED_COMPONENT}#{msg}: User name=#{env['5gtango.user.name']}, user email=#{env['5gtango.user.email']}"
#env['5gtango.user.token'] = token[1]
env['5gtango.user.role'] = decoded_token[:role]
env['5gtango.user.endpoints'] = decoded_token[:endpoints].to_json
Expand All @@ -102,7 +102,7 @@ def token_valid?(token:)

def find_user_name_by_token(token:)
return '' unless token.key?(:username)
STDERR.puts ">>>>Authentication.find_user_name_by_token: #{token[:username]}"
STDERR.puts ">>>> #{LOGGED_COMPONENT}.find_user_name_by_token: #{token[:username]}"
token[:username]
end
def find_user_email_by_token(token:)
Expand Down

0 comments on commit 60fa403

Please sign in to comment.