From: Manasij Sur Roy Date: Mon, 16 May 2016 10:25:10 +0000 (+0530) Subject: SVACE issue fix X-Git-Tag: accepted/tizen/mobile/20160517.033252^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F86%2F69686%2F1;p=platform%2Fcore%2Faccount%2Ffido-client.git SVACE issue fix Change-Id: I608bc336a8cb8f76b259a1a1886bf802038b7177 Signed-off-by: Manasij Sur Roy --- diff --git a/server/fido_server.c b/server/fido_server.c index fa7285b..c940e7d 100755 --- a/server/fido_server.c +++ b/server/fido_server.c @@ -837,6 +837,14 @@ _discover_response_cb_for_process(int tz_error_code, int error_code, GList *avai return; } + if (cb_data->uaf_req->header->operation == NULL) { + _ERR("op field missing in uaf json message"); + + _send_process_response(cb_data, FIDO_ERROR_PROTOCOL_ERROR, NULL); + + return; + } + _INFO("cb_data->type = [%d]", cb_data->type); GList *available_authenticators_full = g_list_first(available_authenticators); @@ -845,10 +853,7 @@ _discover_response_cb_for_process(int tz_error_code, int error_code, GList *avai _INFO("_PROCESS_TYPE_CHECK_POLICY"); - if (cb_data->uaf_req->header->operation != NULL) - _INFO("operation = [%s]", cb_data->uaf_req->header->operation); - else - _ERR("operation = [NULL]"); + _INFO("operation = [%s]", cb_data->uaf_req->header->operation); if ((strcmp(cb_data->uaf_req->header->operation, _UAF_OPERATION_NAME_KEY_REG) == 0) || ((strcmp(cb_data->uaf_req->header->operation, _UAF_OPERATION_NAME_KEY_AUTH) == 0))) {