Defect #139

"Create node" action doesn't check for unique parent node

Added by IƱaki Baz Castillo over 4 years ago. Updated about 2 years ago.

Status:New Start date:
Priority:Low Due date:
Assignee:Adrian Georgescu % Done:

0%

Category:XCAP protocol
Target version:Future release

Description

Suppose a typical pres-rules document with two rules:
  • id="pres_whitelist"
  • id="pres_blacklist"

If I do a wrong GET:

GET /xcap-root/pres-rules/users/xcaptest@domain.net/pres-rules/
~~/cp:ruleset/cp:rule/cp:conditions/cp:identity/cp:one

then OpenXCAP replies 404 with body "The requested node selector /cp:ruleset/cp:rule/cp:conditions/cp:identity/cp:one matches more than one element". OK.

But if I do the same in a PUT operation:

PUT /xcap-root/pres-rules/users/xcaptest@domain.net/pres-rules/
~~/cp:ruleset/cp:rule/cp:conditions/cp:identity/cp:one%5b@id=%22sip:new@new.net%22%5d

then OpenXCAP replies "201 Created" and inserts the commited node into the last <rule>. This is obviously wrong as it should complain.

IMHO, OpenXCAP should perform the same check as in a GET operation before inserting an element.

History

Updated by Tijmen de Mes about 2 years ago

  • 7 set to trunk

Also available in: Atom PDF