diff options
author | Christian Heimes <cheimes@redhat.com> | 2015-06-12 17:13:15 +0200 |
---|---|---|
committer | Christian Heimes <cheimes@redhat.com> | 2015-06-16 11:44:30 +0200 |
commit | dbc313730a47916953ff539cc69e47d8bf0cdc56 (patch) | |
tree | 698ac61385160e579f9a068fd5a2a1439c870a5e /base/ca | |
parent | 955530e72d2489734b80b203d4b1308802e9c2c0 (diff) | |
download | pki-dbc313730a47916953ff539cc69e47d8bf0cdc56.tar.gz pki-dbc313730a47916953ff539cc69e47d8bf0cdc56.tar.xz pki-dbc313730a47916953ff539cc69e47d8bf0cdc56.zip |
NPE when modifying profile without 'action' param
In modifyProfileState check the 'action' query paramter for NULL and
raise a BadRequestException when the paramater is not set.
https://fedorahosted.org/pki/ticket/1361
Diffstat (limited to 'base/ca')
-rw-r--r-- | base/ca/src/org/dogtagpki/server/ca/rest/ProfileService.java | 5 |
1 files changed, 5 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 0e708f4f4..f7d82b05f 100644 --- a/base/ca/src/org/dogtagpki/server/ca/rest/ProfileService.java +++ b/base/ca/src/org/dogtagpki/server/ca/rest/ProfileService.java @@ -388,6 +388,11 @@ public class ProfileService extends PKIService implements ProfileResource { throw new BadRequestException("Unable to modify profile state: Invalid Profile Id"); } + if (action == null) { + CMS.debug("modifyProfileState: invalid request. action is null"); + throw new BadRequestException("Unable to modify profile state: Missing action"); + } + if (ps == null) { CMS.debug("modifyProfileState: ps is null"); throw new PKIException("Error modifying profile state. Profile Service not available"); |