YAFLogo

tommy382
  • tommy382
  • 100% (Exalted)
  • YAF Commander Topic Starter
14 years ago
I have html code in the "adverts" section of the host settings. In verion 1.9.5Final, this is fine. In the new version, the check is someone turned on so IIS disallows post-back containing html code. Where do I turn this off (for the admin page only, not the whole forum). Should this be fixed so the adverts data can contain html code?

For those who ran into the same issue, my work around is to make the admin changes using VS hosted server which doesn't check for potentially dangerous postback.

[HttpRequestValidationException (0x80004005): A potentially dangerous Request.Form value was detected from the client (forum$ctl03$AdPost="<div style="text-ali...").]
   System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection) +11314196
   System.Web.HttpRequest.ValidateNameValueCollection(NameValueCollection nvc, RequestValidationSource requestCollection) +82
   System.Web.HttpRequest.get_Form() +186
   System.Web.HttpRequest.get_HasForm() +11317092
   System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +141
   System.Web.UI.Page.DeterminePostBackMode() +163
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +11270399
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +11269918
   System.Web.UI.Page.ProcessRequest() +119
   System.Web.UI.Page.ProcessRequest(HttpContext context) +167
   ASP.default_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\d3a57383\989832ca\App_Web_w5kcqlax.2.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +597
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +266
Sponsor
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
14 years ago
There is a fix for that problem

A potentially dangerous Request.Form value was detected

http://forum.yetanotherforum.net/yaf_postsm47209_host-settings-saving-error.aspx#post47209 

tommy382
  • tommy382
  • 100% (Exalted)
  • YAF Commander Topic Starter
14 years ago

There is a fix for that problem

A potentially dangerous Request.Form value was detected

Originally Posted by: tha_watcha 

http://forum.yetanotherforum.net/yaf_postsm47209_host-settings-saving-error.aspx#post47209 

That will disable validation request for all pages in the forum. I want to disable validation on the "hostsettings" page only. The "pages\admin\hostsettings.ascx" is not a "page" but rather a "control". Hence, we can't apply the Page directive "ValidateRequest". Anyone want to tackle this problem using Javascript ?