Project

General

Profile

Actions

Bug #20828

closed

Handle scap content title update

Added by Ondřej Pražák over 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Target version:
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

We create missing scap content profiles based on what proxy extracts from scap content. In data_stream_content.rb, we have:

ScapContentProfile.where(:profile_id => key, :title => title, "#{self.class.to_s.demodulize.underscore}_id".to_sym => id).first_or_create

Having :title in search could cause problems in the future. There is unique index on (:profile_id, :scap_content_id). When title for existing profile is updated in openscap, proxy returns updated title, but we fail to find the record (because it has the old title), and when we try to create a new one, we hit the uniqueness constraint.


Related issues 1 (0 open1 closed)

Related to OpenSCAP - Bug #19443: Stack trace when trying to upload new policyDuplicate05/03/2017Actions
Actions

Also available in: Atom PDF