Charles Connell created HADOOP-18972: ----------------------------------------
Summary: Bug in SaslPropertiesResolver allows mutation of internal state Key: HADOOP-18972 URL: https://issues.apache.org/jira/browse/HADOOP-18972 Project: Hadoop Common Issue Type: Bug Reporter: Charles Connell {color:#1d1c1d}When {{SaslDataTransferServer}} or {{SaslDataTranferClient}} want to get a SASL properties map to do a handshake, they call {{SaslPropertiesResolver#getServerProperties()}} or {{{}{color:#1d1c1d}SaslPropertiesResolver{color}#getClientProperties(){}}}, and they get back a {{{}Map<String, String>{}}}. Every call gets the same {{Map}} object back, and then the callers sometimes [call {{{}put(){}}}https://github.com/apache/hadoop/blob/rel/release-3.3.6/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/datatransfer/sasl/SaslDataTransferServer.java#L385] on it. This means that future users of {color:#1d1c1d}{{SaslPropertiesResolver}}{color}{color} get back the wrong information.{color:#1d1c1d} {color} I propose that {color:#1d1c1d}{color:#1d1c1d}{{SaslPropertiesResolver}}{color}{color} should pass a copy of its internal map, so that users can safety modify them{color:#1d1c1d}{color:#1d1c1d}{{.}}{color}{color} PR incoming. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: common-dev-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-dev-h...@hadoop.apache.org