# Bug OP-1783 - Spaces in db password cause installer to crash

Project: OpenProject
Status: rejected
URL: https://community.openproject.org/work_packages/OP-1783

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 4.0.5 |
| Observed in versions |  |
| Sprint | 4.0.5 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable | Karsten Gallinowski |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

The installer naively builds a url with the user’s database password with no escaping, which seems to break things with the following crash (not using my actual password) ;)

    Application.initialize!... rake aborted!
    URI::InvalidURIError: bad URI(is not URI?): mysql2://openproject:spaced pw@127.0.0.1:3306/openproject
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_specification.rb:61:in `connection_url_to_hash'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_specification.rb:36:in `block in resolve_string_connection'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_specification.rb:35:in `fetch'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_specification.rb:35:in `resolve_string_connection'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_specification.rb:27:in `spec'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in `establish_connection'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/railtie.rb:88:in `block (2 levels) in <class:Railtie>'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/lazy_load_hooks.rb:26:in `block in on_load'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/lazy_load_hooks.rb:25:in `each'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/lazy_load_hooks.rb:25:in `on_load'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/railtie.rb:80:in `block in <class:Railtie>'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-3.2.21/lib/rails/initializable.rb:30:in `instance_exec'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-3.2.21/lib/rails/initializable.rb:30:in `run'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-3.2.21/lib/rails/initializable.rb:55:in `block in run_initializers'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-3.2.21/lib/rails/initializable.rb:54:in `each'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-3.2.21/lib/rails/initializable.rb:54:in `run_initializers'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-3.2.21/lib/rails/application.rb:136:in `initialize!'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-3.2.21/lib/rails/railtie/configurable.rb:30:in `method_missing'
    /opt/openproject/config/environment.rb:36:in `block in <top (required)>'
    /opt/openproject/config/application.rb:44:in `block in bench'
    /opt/openproject/config/application.rb:43:in `bench'
    /opt/openproject/config/environment.rb:34:in `<top (required)>'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:251:in `require'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:251:in `block in require'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:236:in `load_dependency'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:251:in `require'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-3.2.21/lib/rails/application.rb:103:in `require_environment!'
    /opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-3.2.21/lib/rails/application.rb:305:in `block (2 levels) in initialize_tasks'
    Tasks: TOP => setting:set => environment
    (See full trace by running task with --trace)
