gpt4 book ai didi

jsp - 使用CF标准无法运行JRun HTTP 500响应错误处理程序

转载 作者:行者123 更新时间:2023-12-03 07:43:30 25 4
gpt4 key购买 nike

我们使用自动安全探测,它显示出一个漏洞,该漏洞导致500响应返回默认错误。通过JRun返回的错误上的信息泄漏被视为漏洞。此500错误发生在JRun中CF之上,并且CF无法处理。

这是导致内部JRun错误的测试代码片段:

<cfhttp url="https://www.domain.com/FormController.cfc" method="post" result="r"><cfhttpparam type="header" name="Accept" value="text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5" />
<cfhttpparam type="header" name="Accept-Charset" value="ISO-8859-1,utf-8;q=0.7,*;q=0.7" />
<cfhttpparam type="header" name="Accept-Encoding" value="gzip;q=1.0, x-gzip;q=0.9, x-bzip2;q=0.9, deflate;q=0.8, identity;q=0.5, base64;q=0.1, quoted-printable;q=0.1, compress;q=0, *;q=0" />
<cfhttpparam type="header" name="Accept-Language" value="en-us,en;q=0.5" />
<cfhttpparam type="header" name="User-Agent" value="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko/20100101 Firefox/13.0.1 WhiteHat Security" />
<cfhttpparam type="header" name="Content-Length" value="158" />
<cfhttpparam type="header" name="Content-Type" value="application/x-www-form-urlencoded" />
<cfhttpparam type="body" value="Method=%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216boot%u002eini%00">
</cfhttp>

<cfdump var="#r#">
<cfoutput>#r.filecontent#</cfoutput>

我使用了此处提供的信息:
Handling 500 JRun servlet in ColdFusion
将自定义处理程序添加到JRun中以解决500错误,如下所示:
<error-page>
<error-code>500</error-code>
<location>/WEB-INF/error-pages/500error.jsp</location>
</error-page>

500error.jsp文件仅输出一些基本信息,例如“Opps发生了错误...”,状态代码和消息,但没有堆栈跟踪。

这在使用CF9 Developer版本在我的MBP上进行开发时效果很好。昨晚当我将它投入生产时(在CF9 Standard/Win2k服务器上),我希望它能正常工作。当我再次使用请求运行测试代码段时,虽然未返回自定义错误,但返回了标准错误servlet错误。我仔细检查了路径,以为jsp可能有错误。我将其更改为纯HTML,仍然是默认错误。

出于纯粹的随机性,我尝试了 http://www.domain.com/error-pages/500error.jsp。除了404之外,我什么都没有发生,但我实际上得到了这一点:
500

A License exception has occurred: You tried to access a restricted feature for the Standard edition: JSP


coldfusion.license.LicenseManager$LicenseIllegalAccessException: A License exception has occurred: You tried to access a restricted feature for the Standard edition: JSP
at coldfusion.license.LicenseManager.byte(Unknown Source)
at coldfusion.license.LicenseManager.checkJSP(Unknown Source)
at coldfusion.license.JspLicenseServlet.service(Unknown Source)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

因此,看来jsp不是标准版的功能吗?因此,我然后尝试将500error.jsp更改为500error.html。更改了文件名,将其更改为静态html,更新了web.xml,然后重新启动,现在在POST上以及击中 http://www.domain.com/error-pages/500error.html时得到了403 Forbidden。

所以我不确定发生了什么。标准版是否不允许在JRun级别进行自定义处理?它可以在Developer Edition上使用,因为它基本上不受限制吗?在文档中找不到答案。除了JRun解决方案,还有其他方法可以处理这500个问题吗?

谢谢

最佳答案

在搜索Adobe文档和大量晦涩的论坛帖子之后,我发现Standard Edition实际上不支持JSP,而Developer和Enterprise则支持。这样就回答了一个问题。

至于将错误处理程序从jsp更改为html,我也不认为这是可能的。除非有设置,否则我会丢失。除了jsp错误外,在IIS和Apache上均会导致403错误。

在IIS上,我检查了我创建的/WEB-INF/error-pages目录的所有权限,但找不到阻止访问的任何内容。我也尝试将html文件放到/WEB-INF/根目录中,但是没有运气。因此,在这一点上,我倾向于放弃。我想这样的模糊黑客尝试会出现403错误,这很好。

关于jsp - 使用CF标准无法运行JRun HTTP 500响应错误处理程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21489377/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com