[DRE-maint] Bug#1019731: Suggested fix

Antoine Le Gonidec debian at dotslashplay.it
Fri Feb 10 17:51:19 GMT 2023


On Tue, 07 Feb 2023 19:02:46 +0100 Pirate Praveen <praveen at onenetbeyond.org> wrote:
> diff --git a/config/application.rb b/config/application.rb
> index 249db9c6a6..e7481e12e1 100644
> --- a/config/application.rb
> +++ b/config/application.rb
> @@ -234,6 +234,12 @@ class Application < Rails::Application
>      config.active_record.has_many_inversing = false
>      config.active_record.belongs_to_required_by_default = false
> 
> + # Allow Gitlab::Diff::Position because it was disallowed
> + # with Rails 6.1.6.4 security update. Whilst they have
> + # re-added support for Symbol, they expect the projects
> + # to add the classes they need to be explicitly allowed.
> + config.active_record.yaml_column_permitted_classes = [Symbol, 
> DateTime, Gitlab::Diff::Position]
> +
>      # Enable the asset pipeline
>      config.assets.enabled = true

With this patch, gitlab-puma.service fails to start with the following trace:

/usr/share/gitlab/config/application.rb:241:in `<class:Application>': uninitialized constant Gitlab::Diff (NameError)
Did you mean?  Diffy
         from /usr/share/gitlab/config/application.rb:18:in `<module:Gitlab>'
         from /usr/share/gitlab/config/application.rb:17:in `<top (required)>'
         from /usr/share/gitlab/config/environment.rb:4:in `require'
         from /usr/share/gitlab/config/environment.rb:4:in `<top (required)>'
         from config.ru:5:in `require'
         from config.ru:5:in `block in <main>'
         from /var/lib/gitlab/.gem/gems/rack-2.2.6.2/lib/rack/builder.rb:116:in `eval'
         from /var/lib/gitlab/.gem/gems/rack-2.2.6.2/lib/rack/builder.rb:116:in `new_from_string'
         from /var/lib/gitlab/.gem/gems/rack-2.2.6.2/lib/rack/builder.rb:105:in `load_file'
         from /var/lib/gitlab/.gem/gems/rack-2.2.6.2/lib/rack/builder.rb:66:in `parse_file'
         from /usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/puma-5.6.5/lib/puma/configuration.rb:348:in `load_rackup'
         from /usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/puma-5.6.5/lib/puma/configuration.rb:270:in `app'
         from /usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/puma-5.6.5/lib/puma/runner.rb:150:in `load_and_bind'
         from /usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/puma-5.6.5/lib/puma/single.rb:44:in `run'
         from /usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/puma-5.6.5/lib/puma/launcher.rb:193:in `run'
         from /usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/puma-5.6.5/lib/puma/cli.rb:81:in `run'
         from /usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/puma-5.6.5/bin/puma:10:in `<top (required)>'
         from /usr/bin/puma:23:in `load'
         from /usr/bin/puma:23:in `<main>'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-ruby-extras-maintainers/attachments/20230210/8096e2df/attachment.sig>


More information about the Pkg-ruby-extras-maintainers mailing list