From a19db60b7dd90b1984c00ff9f1ba58a57cc1e7f0 Mon Sep 17 00:00:00 2001 From: Vitalii Irkha Date: Mon, 1 Jul 2019 13:33:19 +0300 Subject: [PATCH] Check devID for owned device devID should be the same for owned device. https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/529/commits/3b966521b2c0ced20bacce722b741f998ad0391b (cherry picked from 3b966521b2c0ced20bacce722b741f998ad0391b) Change-Id: Icd13121c99faf0cfde92667a5d5fcaf902e0f205 Signed-off-by: Vitalii Irkha Signed-off-by: Sudipto Bal --- resource/csdk/security/src/doxmresource.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resource/csdk/security/src/doxmresource.c b/resource/csdk/security/src/doxmresource.c index 6d35780..e88a381 100644 --- a/resource/csdk/security/src/doxmresource.c +++ b/resource/csdk/security/src/doxmresource.c @@ -1310,6 +1310,13 @@ static OCEntityHandlerResult HandleDoxmPostRequest(OCEntityHandlerRequest * ehRe ehRet = OC_EH_NOT_ACCEPTABLE; goto exit; } + + if(0 != memcmp(&gDoxm->owner.id, &newDoxm->owner.id, sizeof(gDoxm->owner.id))) + { + OIC_LOG(ERROR, TAG, "Not acceptable request for owned property"); + ehRet = OC_EH_NOT_ACCEPTABLE; + } + //Update gDoxm based on newDoxm updateWriteableProperty(newDoxm, gDoxm); -- 2.7.4