Vulnerability in EPiServer.Forms
We have a setup with a backend server for edit/administration tasks and a front end server deliviring pages to the visitor.
Sometimes, not all, when we publish a page on the back end server the re-published page will get the wrong LinkURL. Not the normal
but instead it's permenant link
In some cases the page request on the front end server generates the following exception on the published page
System.UriFormatException: Invalid URI: The hostname could not be parsed. at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) at EPiServer.UrlBuilder..ctor(UrlBuilder url) at EPiServer.Web.FriendlyUrlRewriteProvider.ConvertToInternal(UrlBuilder url, Object& internalObject) at EPiServer.Web.UrlRewriteModule.HttpUrlRewriteToInternal(UrlBuilder url) at EPiServer.Web.UrlRewriteModuleBase.BeginRequestEventHandler(Object sender, EventArgs e) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
As you can see by our pageLink we use a pageprovider.
Does anybody have a clue to why this happands?
Best regards, Jonas
My guess is that the solution lies in your implementation of the method
Uri ResolveLocalPage(Guid pageGuid, out PageReference pageLink);
EPiServer will when it needs to resolve a link from a permanent link format (guid based) to an external format call each registered IPageResolver (all PageProviders are registered as a IPageResolver) what the corresponding Uri is for a given Guid. In case no IPageResolver matches the ReolveLocalPage request the link will be rendered in a guid format.
So in this case it seems that your provider does not return the URI on the request.
Johan Björnfot, EPiServer
Thank you for your reply Johan!
Updated: With more debug info we found a fault in our ResolveLocalPage. Thank you once more for pointing us in the right direction Johan!