You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "Lewis John McGibbney (Jira)" <ji...@apache.org> on 2020/08/01 04:11:00 UTC
[jira] [Created] (NUTCH-2812) Methods returning array may expose
internal representation
Lewis John McGibbney created NUTCH-2812:
-------------------------------------------
Summary: Methods returning array may expose internal representation
Key: NUTCH-2812
URL: https://issues.apache.org/jira/browse/NUTCH-2812
Project: Nutch
Issue Type: Bug
Affects Versions: 1.17
Reporter: Lewis John McGibbney
Assignee: Lewis John McGibbney
Fix For: 1.18
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.
For example org.apache.nutch.fetcher.FetchNode.getOutlinks() may expose internal representation by returning FetchNode.outlinks
There are 11 such occurrences of this bug in the codebase.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)