From b307842da6c57f35b8ac5dd66948e27792f1994c Mon Sep 17 00:00:00 2001 From: Mason Ballengee Date: Mon, 23 Jan 2023 09:56:40 -0500 Subject: [PATCH 1/4] Update file_locator to handle @ sign --- app/services/file_locator.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/services/file_locator.rb b/app/services/file_locator.rb index e4d56755d0..cb260d1aab 100644 --- a/app/services/file_locator.rb +++ b/app/services/file_locator.rb @@ -1,11 +1,11 @@ # Copyright 2011-2022, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# +# # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the @@ -24,7 +24,7 @@ class S3File def initialize(uri) uri = Addressable::URI.parse(uri) @bucket = Addressable::URI.unencode(uri.host) - @key = Addressable::URI.unencode(uri.path).sub(%r(^/*(.+)/*$),'\1') + @key = Addressable::URI.unencode(ActiveEncode.sanitize_uri(uri)).sub(%r(^/*(.+)/*$),'\1') end def object From 6e3229ffc8276ac2020055bd4817f51c624433ec Mon Sep 17 00:00:00 2001 From: Mason Ballengee Date: Mon, 30 Jan 2023 15:54:06 -0500 Subject: [PATCH 2/4] Bump ActiveEncode version --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index ceea39185b..262f1da542 100644 --- a/Gemfile +++ b/Gemfile @@ -70,7 +70,7 @@ gem 'omniauth-lti', git: "https://github.com/avalonmediasystem/omniauth-lti.git" gem "omniauth-saml", "~> 2.0" # Media Access & Transcoding -gem 'active_encode', '~> 1.0' +gem 'active_encode', '~> 1.1.2' gem 'audio_waveform-ruby', '~> 1.0.7', require: 'audio_waveform' gem 'browse-everything', git: "https://github.com/avalonmediasystem/browse-everything.git", branch: 'v1.2-avalon' gem 'fastimage' diff --git a/Gemfile.lock b/Gemfile.lock index c668f9b0a3..289f53deba 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -132,7 +132,7 @@ GEM active_elastic_job (3.2.0) aws-sdk-sqs (~> 1) rails (>= 5.2.6, < 7.1) - active_encode (1.1.1) + active_encode (1.1.2) addressable (~> 2.8) rails active_fedora-datastreams (0.4.0) @@ -959,7 +959,7 @@ DEPENDENCIES active-fedora (~> 13.2, >= 13.2.5) active_annotations (~> 0.4) active_elastic_job - active_encode (~> 1.0) + active_encode (~> 1.1.2) active_fedora-datastreams (~> 0.4) activejob-traffic_control activejob-uniqueness From 3281616a3683c9b6d553df521b1377ceafdc2d5e Mon Sep 17 00:00:00 2001 From: Mason Ballengee Date: Mon, 30 Jan 2023 16:47:34 -0500 Subject: [PATCH 3/4] Use less restrictive version designation for AcitveEncode --- Gemfile | 2 +- Gemfile.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 262f1da542..b5465e28db 100644 --- a/Gemfile +++ b/Gemfile @@ -70,7 +70,7 @@ gem 'omniauth-lti', git: "https://github.com/avalonmediasystem/omniauth-lti.git" gem "omniauth-saml", "~> 2.0" # Media Access & Transcoding -gem 'active_encode', '~> 1.1.2' +gem 'active_encode', '~> 1.0', '>=1.1.2' gem 'audio_waveform-ruby', '~> 1.0.7', require: 'audio_waveform' gem 'browse-everything', git: "https://github.com/avalonmediasystem/browse-everything.git", branch: 'v1.2-avalon' gem 'fastimage' diff --git a/Gemfile.lock b/Gemfile.lock index 289f53deba..139ef8e76a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -959,7 +959,7 @@ DEPENDENCIES active-fedora (~> 13.2, >= 13.2.5) active_annotations (~> 0.4) active_elastic_job - active_encode (~> 1.1.2) + active_encode (~> 1.0, >= 1.1.2) active_fedora-datastreams (~> 0.4) activejob-traffic_control activejob-uniqueness From f87bc0d684480a42a21cebc7001290d4285b1d1d Mon Sep 17 00:00:00 2001 From: Mason Ballengee <68433277+masaball@users.noreply.github.com> Date: Mon, 30 Jan 2023 16:49:57 -0500 Subject: [PATCH 4/4] Update Gemfile --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index b5465e28db..f890e57901 100644 --- a/Gemfile +++ b/Gemfile @@ -70,7 +70,7 @@ gem 'omniauth-lti', git: "https://github.com/avalonmediasystem/omniauth-lti.git" gem "omniauth-saml", "~> 2.0" # Media Access & Transcoding -gem 'active_encode', '~> 1.0', '>=1.1.2' +gem 'active_encode', '~> 1.0', '>= 1.1.2' gem 'audio_waveform-ruby', '~> 1.0.7', require: 'audio_waveform' gem 'browse-everything', git: "https://github.com/avalonmediasystem/browse-everything.git", branch: 'v1.2-avalon' gem 'fastimage'