Defect #139
"Create node" action doesn't check for unique parent node
| Status: | New | Start date: | ||
|---|---|---|---|---|
| Priority: | Low | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | XCAP protocol | |||
| Target version: | Future release |
Description
Suppose a typical pres-rules document with two rules:
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.
then OpenXCAP replies "201 Created" and inserts the commited node into the last <rule>. This is obviously wrong as it should complain.
- 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 1 year ago
- 7 set to trunk