Ticket #123 (accepted Defect)

Opened 3 years ago

Last modified 2 years ago

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

Reported by: ibc Owned by: adigeo
Priority: Major Milestone: Future release
Component: XCAP protocol Version: trunk
Severity: Non-critical Keywords:
Cc:

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.

Change History

comment:1 Changed 2 years ago by adigeo

  • Owner changed from support@ag-projects.com to adigeo
  • Status changed from new to accepted

comment:2 Changed 2 years ago by saul

  • Milestone changed from OpenXCAP 1.2.0 to Future release
Note: See TracTickets for help on using tickets.