ashenchowthee / zaproxy

Automatically exported from code.google.com/p/zaproxy
0 stars 0 forks source link

API htmlReport() method is not producing a html report #1589

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run an active scan and make sure that there are some alerts.
2. Access ZAP API and run the request for HTML report.
3. http://zap/OTHER/core/other/htmlreport/ returns empty response.

What is the expected output? What do you see instead?
A HTML response should be returned, instead empty response is seen.

What version of the product are you using? On what operating system?
Latest Weekly build. 2015_03_30

Please provide any additional information below.

Original issue reported on code.google.com by dmet...@gmail.com on 1 Apr 2015 at 10:22

GoogleCodeExporter commented 9 years ago
It's working for me. From the described behaviour it seems to be Issue 1277.
Would you mind checking ZAP's log file to see if there's any error?

Original comment by THC...@gmail.com on 1 Apr 2015 at 10:54

GoogleCodeExporter commented 9 years ago
Here's what I see in logs when I try to access the HTMLReport() method from API.

2015-04-01 16:26:43,097 [ZAP-ProxyThread-740] ERROR ReportGenerator - The 
element type "p" must be terminated by the matching end-tag "</p>".
org.xml.sax.SAXParseException; lineNumber: 6224; columnNumber: 1071819; The 
element type "p" must be terminated by the matching end-tag "</p>".
    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:347)
    at org.parosproxy.paros.extension.report.ReportGenerator.stringToHtml(ReportGenerator.java:136)
    at org.zaproxy.zap.extension.api.CoreAPI.writeReportLastScanTo(CoreAPI.java:870)
    at org.zaproxy.zap.extension.api.CoreAPI.handleApiOther(CoreAPI.java:738)
    at org.zaproxy.zap.extension.api.API.handleApiRequest(API.java:350)
    at org.parosproxy.paros.core.proxy.ProxyThread.processHttp(ProxyThread.java:321)
    at org.parosproxy.paros.core.proxy.ProxyThread.run(ProxyThread.java:236)
    at java.lang.Thread.run(Thread.java:745)

When I try to generate the report thru UI, here's the error message in logs:

2015-04-01 16:31:31,728 [AWT-EventQueue-0] ERROR ReportGenerator - The element 
type "p" must be terminated by the matching end-tag "</p>".
org.xml.sax.SAXParseException; lineNumber: 6224; columnNumber: 1071819; The 
element type "p" must be terminated by the matching end-tag "</p>".
    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:347)
    at org.parosproxy.paros.extension.report.ReportGenerator.stringToHtml(ReportGenerator.java:102)
    at org.parosproxy.paros.extension.report.ReportLastScan.generate(ReportLastScan.java:73)
    at org.parosproxy.paros.extension.report.ReportLastScan.generateReport(ReportLastScan.java:189)
    at org.parosproxy.paros.extension.report.ExtensionReport$1.actionPerformed(ExtensionReport.java:100)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
    at java.awt.Component.processMouseEvent(Component.java:6516)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3312)
    at java.awt.Component.processEvent(Component.java:6281)
    at java.awt.Container.processEvent(Container.java:2229)
    at java.awt.Component.dispatchEventImpl(Component.java:4872)
    at java.awt.Container.dispatchEventImpl(Container.java:2287)
    at java.awt.Component.dispatchEvent(Component.java:4698)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    at java.awt.Container.dispatchEventImpl(Container.java:2273)
    at java.awt.Window.dispatchEventImpl(Window.java:2719)
    at java.awt.Component.dispatchEvent(Component.java:4698)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:740)
    at java.awt.EventQueue.access$300(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:699)
    at java.awt.EventQueue$3.run(EventQueue.java:697)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.awt.EventQueue$4.run(EventQueue.java:713)
    at java.awt.EventQueue$4.run(EventQueue.java:711)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:710)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

Original comment by dmet...@gmail.com on 1 Apr 2015 at 11:33

GoogleCodeExporter commented 9 years ago
Ah, that's Issue 1555.

Original comment by THC...@gmail.com on 2 Apr 2015 at 1:16