Project

General

Profile

Actions

Bug #30064

closed

RootRepository password length too short

Added by Partha Aji almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Repositories
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

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


Related issues 1 (0 open1 closed)

Related to Katello - Bug #29931: Root repository upstream password saved in clear textClosedPiyush TiwariActions
Actions #1

Updated by Partha Aji almost 4 years ago

  • Related to Bug #29931: Root repository upstream password saved in clear text added
Actions #2

Updated by Partha Aji almost 4 years ago

  • Category set to Repositories
  • Target version set to Katello 3.16.0
  • Triaged changed from No to Yes
Actions #3

Updated by The Foreman Bot almost 4 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/8753 added
Actions #4

Updated by The Foreman Bot almost 4 years ago

  • Fixed in Releases Katello 4.0.0 added
Actions #5

Updated by Piyush Tiwari almost 4 years ago

  • Status changed from Ready For Testing to Closed
Actions #6

Updated by The Foreman Bot almost 4 years ago

  • Assignee set to Ian Ballou
Actions #7

Updated by Bryan Kearney almost 4 years ago

  • Bugzilla link set to 1630536
Actions

Also available in: Atom PDF