diff options
author | Fraser Tweedale <ftweedal@redhat.com> | 2017-02-07 21:12:08 +1000 |
---|---|---|
committer | Fraser Tweedale <ftweedal@redhat.com> | 2017-04-26 17:45:51 +1000 |
commit | 62419afd831039e7487ba184c6bf8f876f4d21da (patch) | |
tree | 1c7e5feb77e1340a6dc81082e0891360a6cfbd72 /base/ca | |
parent | 6562b05a73090c0f7882a9684a8ceac2666e4401 (diff) | |
download | pki-62419afd831039e7487ba184c6bf8f876f4d21da.tar.gz pki-62419afd831039e7487ba184c6bf8f876f4d21da.tar.xz pki-62419afd831039e7487ba184c6bf8f876f4d21da.zip |
ProfileService: clear profile attributes when modifying
When modifying a profile, attributes are not cleared. Attributes
that were removed in the updated profile configuration are not
actually removed.
When updating a profile via PUT /ca/rest/profiles/{id}/raw, clear
the config store before loading the new configuration.
Fixes: https://fedorahosted.org/pki/ticket/2588
Change-Id: I4988315c57bb5d5a44deb04d41603adb39780f19
Diffstat (limited to 'base/ca')
-rw-r--r-- | base/ca/src/org/dogtagpki/server/ca/rest/ProfileService.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/base/ca/src/org/dogtagpki/server/ca/rest/ProfileService.java b/base/ca/src/org/dogtagpki/server/ca/rest/ProfileService.java index be6189215..8666b9c11 100644 --- a/base/ca/src/org/dogtagpki/server/ca/rest/ProfileService.java +++ b/base/ca/src/org/dogtagpki/server/ca/rest/ProfileService.java @@ -718,6 +718,7 @@ public class ProfileService extends SubsystemService implements ProfileResource } // no error thrown, so commit updated profile config + profile.getConfigStore().clear(); profile.getConfigStore().load(new ByteArrayInputStream(data)); ps.disableProfile(profileId); ps.commitProfile(profileId); |