[jira] [Commented] (STORM-1204) Logviewer should graceful report page-not-found instead of 500 for bad topo-id etc

2015-11-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/STORM-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15011941#comment-15011941
 ] 

ASF GitHub Bot commented on STORM-1204:
---

Github user asfgit closed the pull request at:

https://github.com/apache/storm/pull/879


> Logviewer should graceful report page-not-found instead of 500 for bad 
> topo-id etc
> --
>
> Key: STORM-1204
> URL: https://issues.apache.org/jira/browse/STORM-1204
> Project: Apache Storm
>  Issue Type: Bug
>  Components: storm-core
>Reporter: Kishor Patil
>Assignee: Kishor Patil
>
> Whenever topology-id or filename is wrong or ( in case of secure cluster if 
> user is not authorized), the logviewer shows HTTP-500 exception.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (STORM-1204) Logviewer should graceful report page-not-found instead of 500 for bad topo-id etc

2015-11-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/STORM-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15006778#comment-15006778
 ] 

ASF GitHub Bot commented on STORM-1204:
---

Github user revans2 commented on the pull request:

https://github.com/apache/storm/pull/879#issuecomment-157066468
  
+1


> Logviewer should graceful report page-not-found instead of 500 for bad 
> topo-id etc
> --
>
> Key: STORM-1204
> URL: https://issues.apache.org/jira/browse/STORM-1204
> Project: Apache Storm
>  Issue Type: Bug
>  Components: storm-core
>Reporter: Kishor Patil
>Assignee: Kishor Patil
>
> Whenever topology-id or filename is wrong or ( in case of secure cluster if 
> user is not authorized), the logviewer shows HTTP-500 exception.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (STORM-1204) Logviewer should graceful report page-not-found instead of 500 for bad topo-id etc

2015-11-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/STORM-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15006925#comment-15006925
 ] 

ASF GitHub Bot commented on STORM-1204:
---

Github user kishorvpatil commented on the pull request:

https://github.com/apache/storm/pull/879#issuecomment-157097910
  
@redsanket We are doing this only are couple of places.. no making it a 
utility may not be much useful.


> Logviewer should graceful report page-not-found instead of 500 for bad 
> topo-id etc
> --
>
> Key: STORM-1204
> URL: https://issues.apache.org/jira/browse/STORM-1204
> Project: Apache Storm
>  Issue Type: Bug
>  Components: storm-core
>Reporter: Kishor Patil
>Assignee: Kishor Patil
>
> Whenever topology-id or filename is wrong or ( in case of secure cluster if 
> user is not authorized), the logviewer shows HTTP-500 exception.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (STORM-1204) Logviewer should graceful report page-not-found instead of 500 for bad topo-id etc

2015-11-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/STORM-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15006755#comment-15006755
 ] 

ASF GitHub Bot commented on STORM-1204:
---

Github user redsanket commented on the pull request:

https://github.com/apache/storm/pull/879#issuecomment-157061483
  
minor suggestion, +1 NB


> Logviewer should graceful report page-not-found instead of 500 for bad 
> topo-id etc
> --
>
> Key: STORM-1204
> URL: https://issues.apache.org/jira/browse/STORM-1204
> Project: Apache Storm
>  Issue Type: Bug
>  Components: storm-core
>Reporter: Kishor Patil
>Assignee: Kishor Patil
>
> Whenever topology-id or filename is wrong or ( in case of secure cluster if 
> user is not authorized), the logviewer shows HTTP-500 exception.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (STORM-1204) Logviewer should graceful report page-not-found instead of 500 for bad topo-id etc

2015-11-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/STORM-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15006752#comment-15006752
 ] 

ASF GitHub Bot commented on STORM-1204:
---

Github user redsanket commented on a diff in the pull request:

https://github.com/apache/storm/pull/879#discussion_r44933452
  
--- Diff: storm-core/src/clj/backtype/storm/daemon/logviewer.clj ---
@@ -967,15 +978,30 @@
 (ring-response-from-exception ex
   (GET "/dumps/:topo-id/:host-port/:filename"
[:as {:keys [servlet-request servlet-response log-root]} topo-id 
host-port filename ]
- (let [port (second (split host-port #":"))]
-   (-> (resp/response (File. (str log-root
-  file-path-separator
-  topo-id
-  file-path-separator
-  port
-  file-path-separator
-  filename)))
-   (resp/content-type "application/octet-stream"
+ (let [user (.getUserName http-creds-handler servlet-request)
+   port (second (split host-port #":"))
+   dir (File. (str log-root
+   file-path-separator
+   topo-id
+   file-path-separator
+   port))
+   file (File. (str log-root
+file-path-separator
+topo-id
+file-path-separator
+port
+file-path-separator
+filename))]
--- End diff --

Can we convert this to a utility method, it will be useful


> Logviewer should graceful report page-not-found instead of 500 for bad 
> topo-id etc
> --
>
> Key: STORM-1204
> URL: https://issues.apache.org/jira/browse/STORM-1204
> Project: Apache Storm
>  Issue Type: Bug
>  Components: storm-core
>Reporter: Kishor Patil
>Assignee: Kishor Patil
>
> Whenever topology-id or filename is wrong or ( in case of secure cluster if 
> user is not authorized), the logviewer shows HTTP-500 exception.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (STORM-1204) Logviewer should graceful report page-not-found instead of 500 for bad topo-id etc

2015-11-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/STORM-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15007365#comment-15007365
 ] 

ASF GitHub Bot commented on STORM-1204:
---

Github user zhuoliu commented on the pull request:

https://github.com/apache/storm/pull/879#issuecomment-157177411
  
+1


> Logviewer should graceful report page-not-found instead of 500 for bad 
> topo-id etc
> --
>
> Key: STORM-1204
> URL: https://issues.apache.org/jira/browse/STORM-1204
> Project: Apache Storm
>  Issue Type: Bug
>  Components: storm-core
>Reporter: Kishor Patil
>Assignee: Kishor Patil
>
> Whenever topology-id or filename is wrong or ( in case of secure cluster if 
> user is not authorized), the logviewer shows HTTP-500 exception.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (STORM-1204) Logviewer should graceful report page-not-found instead of 500 for bad topo-id etc

2015-11-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/STORM-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15005568#comment-15005568
 ] 

ASF GitHub Bot commented on STORM-1204:
---

GitHub user kishorvpatil opened a pull request:

https://github.com/apache/storm/pull/879

[STORM-1204] Fixing attempt to access to directory before authorizing user

Fixing dumps endpoints, if URL request has no file/directory it return 500 
instead of page-not-found.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/kishorvpatil/incubator-storm STORM-1204

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/storm/pull/879.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #879


commit 8cf5932958954fc591146f5119da78b8e0ef7307
Author: Kishor Patil 
Date:   2015-11-13T18:46:55Z

Fixing attempt to access to directory before checking user authorization 
and avoid dumps listing error




> Logviewer should graceful report page-not-found instead of 500 for bad 
> topo-id etc
> --
>
> Key: STORM-1204
> URL: https://issues.apache.org/jira/browse/STORM-1204
> Project: Apache Storm
>  Issue Type: Bug
>  Components: storm-core
>Reporter: Kishor Patil
>Assignee: Kishor Patil
>
> Whenever topology-id or filename is wrong or ( in case of secure cluster if 
> user is not authorized), the logviewer shows HTTP-500 exception.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)