arina-ielchiieva commented on a change in pull request #1864: DRILL-7351: Added 
tokens to Web forms to prevent CSRF attacks
URL: https://github.com/apache/drill/pull/1864#discussion_r330008421
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/StorageResources.java
 ##########
 @@ -301,4 +315,29 @@ public String getResult() {
     }
 
   }
+
+  /**
+   * Model class for Storage Plugin page
+   */
+  public static class StoragePluginsPage {
+    private final List<PluginConfigWrapper> plugins;
+    private final String csrfToken;
+
+    public StoragePluginsPage(List<PluginConfigWrapper> plugins, 
HttpServletRequest request) {
 
 Review comment:
   Frankly saying, I am not sure why you need this class, overall it's 
structure is not correct. For instance, why we need class that can return list 
of plugins and only first plugin (I believe in some cases you know that there 
is only one plugin but still such code is not logically correct). More correct 
will be to have model that stores one plugin with crft token and then return 
list of such models instead of current class.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to