[ https://issues.apache.org/jira/browse/HDFS-9711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15151225#comment-15151225 ]
Chris Nauroth commented on HDFS-9711: ------------------------------------- bq. Can we move WebHdfsFileSystem#getTrimmedStringList() with default string support to StringUtils so that it can be used by configure keys similar to this? I considered this a while ago, but then I decided against it. It would be cumbersome to put this method into {{StringUtils}}, because it would create a circular dependency between {{Configuration}} and {{StringUtils}}. We could potentially make it a member of {{Configuration}}, but then the problem is that there are similar pre-existing methods, but with slightly different semantics, accepting a default list as varargs instead of a default string configuration value: {code} public String[] getStrings(String name, String... defaultValue) { {code} {code} public String[] getTrimmedStrings(String name, String... defaultValue) { {code} Adding {{Configuration#getTrimmedStringList(String, String)}} would become part of the public API of {{Configuration}}, and the lack of symmetry with existing methods could be a source of confusion. We could revisit this later though if it becomes a common pattern. I'd like to commit this later today based on the multiple +1s. > Integrate CSRF prevention filter in WebHDFS. > -------------------------------------------- > > Key: HDFS-9711 > URL: https://issues.apache.org/jira/browse/HDFS-9711 > Project: Hadoop HDFS > Issue Type: New Feature > Components: datanode, namenode, webhdfs > Reporter: Chris Nauroth > Assignee: Chris Nauroth > Attachments: HDFS-9711.001.patch, HDFS-9711.002.patch, > HDFS-9711.003.patch, HDFS-9711.004.patch, HDFS-9711.005.patch > > > HADOOP-12691 introduced a filter in Hadoop Common to help REST APIs guard > against cross-site request forgery attacks. This issue tracks integration of > that filter in WebHDFS. -- This message was sent by Atlassian JIRA (v6.3.4#6332)