Actions
Bug #30064
closedRootRepository password length too short
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Description
The upstream_password in the root repository table was created to hold auto generated keys of 760 characters and above 1024. However check the code here
[1] pry(main)> a = Katello::RootRepository.last => #<Katello::RootRepository:0x0000000010baad50 id: 5, .... .... http_proxy_id: nil> [4] pry(main)> a.upstream_password = "A"*500 => "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" [5] pry(main)> a.save! ActiveRecord::ValueTooLong: PG::StringDataRightTruncation: ERROR: value too long for type character varying(1024) from /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activerecord-6.0.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:672:in `exec_params' Caused by PG::StringDataRightTruncation: ERROR: value too long for type character varying(1024) from /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activerecord-6.0.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:672:in `exec_params'
- Create a root repository and give it an upstream password > 500 characters.
Expected:
Works well
Actual:
Fails with "value too long for type character varying(1024)" error
Note:
password in the http_proxies table does not have a limit
password | character varying | | |
While root repository does.
upstream_password | character varying(1024) | | |
h
Updated by Partha Aji over 4 years ago
- Related to Bug #29931: Root repository upstream password saved in clear text added
Updated by Partha Aji over 4 years ago
- Category set to Repositories
- Target version set to Katello 3.16.0
- Triaged changed from No to Yes
Updated by The Foreman Bot over 4 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/8753 added
Updated by The Foreman Bot over 4 years ago
- Fixed in Releases Katello 4.0.0 added
Updated by Piyush Tiwari over 4 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|8c51d7b477c95d6c22745a469d711fb17d3cfa36.
Actions