diff options
Diffstat (limited to 'app/controllers/concerns/uploads_actions.rb')
-rw-r--r-- | app/controllers/concerns/uploads_actions.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/controllers/concerns/uploads_actions.rb b/app/controllers/concerns/uploads_actions.rb index 0d64a685065..222fcc17222 100644 --- a/app/controllers/concerns/uploads_actions.rb +++ b/app/controllers/concerns/uploads_actions.rb @@ -11,7 +11,7 @@ module UploadsActions prepend_before_action :set_request_format_from_path_extension rescue_from FileUploader::InvalidSecret, with: :render_404 - rescue_from ::Gitlab::Utils::PathTraversalAttackError do + rescue_from ::Gitlab::PathTraversal::PathTraversalAttackError do head :bad_request end end @@ -37,7 +37,7 @@ module UploadsActions # - or redirect to its URL # def show - Gitlab::Utils.check_path_traversal!(params[:filename]) + Gitlab::PathTraversal.check_path_traversal!(params[:filename]) return render_404 unless uploader&.exists? @@ -129,6 +129,14 @@ module UploadsActions return unless uploader = build_uploader uploader.retrieve_from_store!(params[:filename]) + + Gitlab::AppJsonLogger.info( + message: 'Deprecated usage of build_uploader_from_params', + uploader_class: uploader.class.name, + path: params[:filename], + exists: uploader.exists? + ) + uploader end |