[YANGTOOLS-231] Make arrays non-mutable Created: 26/Jul/14  Updated: 10/Apr/22  Resolved: 10/Mar/17

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement
Reporter: Dana Kutenicsova Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: PC


Issue Links:
Blocks
blocks MDSAL-40 Milestone: Implement Binding Specific... Resolved

 Description   

All simple arrays are stored as they are, making it a security risk:

Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object. If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.



 Comments   
Comment by Ladislav Borak [ 13/Aug/14 ]

proposed patch: https://git.opendaylight.org/gerrit/#/c/9686/

Generated at Wed Feb 07 20:52:38 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.