Ticket #123 (accepted Defect)
"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
Note: See
TracTickets for help on using
tickets.
