Cannot use a leading to exit above the top directory năm 2024

thanks for your Answer Juraj. We made larger analyse and found that all af these erorrs are caused by some strange crawlers requests which are trying to reach some non sense url like:

  1. domain/remote/fgt_lang lang=/../../../..//////////dev/cmdb/sslvpn_websession
  2. domain/index.php option=com_perchaimageattach&controller=../../../../../../../../../../etc/passwd%00
  3. domain/remote/fgt_lang lang=/../../../..//////////dev/

In case that url has a lot of "../" parts it tries to go above row and exception is fired.

Thanks and have nice day. M.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.

Guest

norashlea- 9/30/2006 3:22:19 AM

"Cannot use a leading .. to exit" error in log

Hi,

Just wondering what this error is that I see occurring in the event log frequently. Checking the IP's where it has occurred, they are always those of the web crawlers [eg, crawl-66-249-66-202.googlebot.com, or egspd42212.ask.com].

Is there something I need to modify to prevent the error from occurring? [see exception details below]

System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. -> System.Web.HttpException: Cannot use a leading .. to exit above the top directory. at System.Web.Util.UrlPath.ReduceVirtualPath[String path] at System.Web.Util.UrlPath.Reduce[String path] at System.Web.Util.UrlPath.Combine[String appPath, String basepath, String relative] at System.Web.HttpResponse.ApplyAppPathModifier[String virtualPath] at System.Web.UI.HtmlControls.HtmlForm.GetActionAttribute[] at System.Web.UI.HtmlControls.HtmlForm.RenderAttributes[HtmlTextWriter writer] at System.Web.UI.HtmlControls.HtmlControl.RenderBeginTag[HtmlTextWriter writer] at System.Web.UI.HtmlControls.HtmlForm.Render[HtmlTextWriter output] at System.Web.UI.Control.RenderControlInternal[HtmlTextWriter writer, ControlAdapter adapter] at System.Web.UI.Control.RenderControl[HtmlTextWriter writer, ControlAdapter adapter] at System.Web.UI.HtmlControls.HtmlForm.RenderControl[HtmlTextWriter writer] at ASP.main_master.__Render__control1[HtmlTextWriter __w, Control parameterContainer] in d:\bds\NCG\main.master:line 9 at System.Web.UI.Control.RenderChildrenInternal[HtmlTextWriter writer, ICollection children] at System.Web.UI.Control.RenderChildren[HtmlTextWriter writer] at System.Web.UI.Control.Render[HtmlTextWriter writer] at System.Web.UI.Control.RenderControlInternal[HtmlTextWriter writer, ControlAdapter adapter] at System.Web.UI.Control.RenderControl[HtmlTextWriter writer, ControlAdapter adapter] at System.Web.UI.Control.RenderControl[HtmlTextWriter writer] at System.Web.UI.Control.RenderChildrenInternal[HtmlTextWriter writer, ICollection children] at System.Web.UI.Control.RenderChildren[HtmlTextWriter writer] at System.Web.UI.Page.Render[HtmlTextWriter writer] at System.Web.UI.Control.RenderControlInternal[HtmlTextWriter writer, ControlAdapter adapter] at System.Web.UI.Control.RenderControl[HtmlTextWriter writer, ControlAdapter adapter] at System.Web.UI.Control.RenderControl[HtmlTextWriter writer] at System.Web.UI.Page.ProcessRequestMain[Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint] - End of inner exception stack trace --- at System.Web.UI.Page.HandleError[Exception e] at System.Web.UI.Page.ProcessRequestMain[Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint] at System.Web.UI.Page.ProcessRequest[Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint] at System.Web.UI.Page.ProcessRequest[] at System.Web.UI.Page.ProcessRequestWithNoAssert[HttpContext context] at System.Web.UI.Page.ProcessRequest[HttpContext context] at ASP.news_aspx.ProcessRequest[HttpContext context] in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\a990665e\57e2da2f\App_Web_sw5pc22p.7.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute[] at System.Web.HttpApplication.ExecuteStep[IExecutionStep step, Boolean& completedSynchronously]

Thanks, Sharon.

Guest

admin- 10/10/2006 9:26:06 AM

Re: "Cannot use a leading .. to exit" error in log

Hi Sharon,

this is a general ASP.NET issue. Unfortunately, we are not aware of any solution for this.

Best Regards,

Member

trint99- 2/1/2007 6:07:55 PM

Re: "Cannot use a leading .. to exit" error in log

I am facing this same issue and it is causing catastrophic failure. This issue MUST be resolved. By tracing the requests, it appears that this is happening most often when google crawls the site [which is happening fairly often because the site just went live].

Because of URL rewriting, a request made to a managed page with a long directory path is handled by Kentico and the actual path fed by IIS is only one or two directories deep. Here's an example from my site:

Page requested [Using friendly URLs]: //www.altn.com/Products/MessagingSolutions/MDaemon/

Page fed by IIS: //www.altn.com/PageTemplates/TwoColumnNav.aspx?aliaspath=/Products/MessagingSolutions/MDaemon

Now, if I wanted to get to the root, judging by the friendly url, I would try "../../../"

But as far as IIS knows that would take you beyond the application root, which is caught as an exception.

I have searched throughout my code and my content and, other than the cmsdesk, I can not find any parent paths that would cause this error.

Member

trint99- 2/1/2007 6:09:33 PM

Re: "Cannot use a leading .. to exit" error in log

Sorry. I always forget this part.

We're running 1.9.2579 Professional.

Member

v2visual- 4/3/2007 3:47:31 AM

RE:"Cannot use a leading .. to exit" error in log

I've had the same problem with a number of Kentico sites, I've just found this article..

//todotnet.com/archive/0001/01/01/7472.aspx?Pending=true

I'm about to try it, looks like a good workaround for now.

Certified Developer 8

norashlea- 4/16/2007 3:22:49 AM

RE:"Cannot use a leading .. to exit" error in log

Did you have any success with this? If so, can you tell me what you did? I've got the same issue with quite a few sites.

Member

trint99- 4/17/2007 10:58:03 PM

RE:"Cannot use a leading .. to exit" error in log

The issue is caused by a bug in the .NET 2.0 framework related to URL rewriting.

There seem to be two possible fixes, one simple but seems odd, the other very complex but makes more sense.

I have posted on the ASP.NET forums seeking guidance on which is the better fix. That post has links to both fixes.

My post: //forums.asp.net/1669811/ShowThread.aspx

1669811

The easy fix: //communityserver.org/forums/t/469081.aspx

The complex fix: //todotnet.com/archive/0001/01/01/7472.aspx

I am using the simple fix and waiting for a response to my post to see if it is the best solution.

Certified Developer 8

Norashlea- 4/18/2007 2:11:48 AM

RE:"Cannot use a leading .. to exit" error in log

Thanks for the links. Great info.

I'll watch your post for responses. Impact on SEO is definitely an issue for me too! And not keen on trying the complex fix.

Chủ Đề