[CONTROLLER-707] PUT fails to validate outer object name in json Created: 19/Aug/14 Updated: 14/Nov/17 Resolved: 11/Sep/14 |
|
| Status: | Resolved |
| Project: | controller |
| Component/s: | restconf |
| Affects Version/s: | Helium |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Devin Avery | Assignee: | Jozef Gloncak |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: Mac OS |
||
| External issue ID: | 1582 |
| Description |
|
I found that if I perform a PUT to toaster I am able to define any content for the outer module name. That is I can do a PUT to: http://localhost:8181/restconf/config/toaster:toaster with this body: { } Essentially the ANY_TEXT_YOU_WANT is completely ignored by the parser. We should either validate it, or better yet, do NOT require it. That is I should be able to PUT to the above toaster URL just { since I am already in the context of toaster based on the URL. I do not know if the same problem exists with XML. |
| Comments |
| Comment by Jozef Gloncak [ 08/Sep/14 ] |
|
Higher described behavior was caused with normalizedNodeName() which ignores nodeBuilder's localName and use QName from schemaNode which is specified as input of this method. Validation method was added befare normalization call. |
| Comment by Jozef Gloncak [ 08/Sep/14 ] |
|
BTW, the same behavior was also identified in XML |