DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

HtmlSanitizer error with DNNSharp Action Form

 5 Replies
 1 Subscribed to this topic
 33 Subscribed to this forum
Sort:
Author
Messages
New Around Here
Posts: 25
New Around Here
Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!

After upgrade to 10.2.1 , i'm getting the following error when submitting a DNNSharp Action form 

Could not load type 'Ganss.XSS.HtmlSanitizer' from assembly 'HtmlSanitizer, Version=9.0.0.0, Culture=neutral, PublicKeyToken=61c49a1a9e79cc28

Is this an DNNSharp problem or a DNN problem

 

 

Veteran Member
Posts: 349
Veteran Member
3 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
MVP
MVP
You're an MVP!
Engaged Reader
Engaged Reader
You are an engaged reader!
Avid Reader
Avid Reader
Avid Reader art thou!
DNNSharp might have been using HtmlSanitizer before DNN started and their may be a version conflict. You would have to check which version is in the bin folder and in the web(dot)config "binding redirect" and in the database "Assemblies" table to get a better idea on how that conflict needs to be resolved.
New Around Here
Posts: 25
New Around Here
Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!













HtmlSanitizer.dll in bin folder is 9.1.878.0

There is another htmlsanitizer.dll in bin/plantanapp which is version 6.0.441.0

Where do i look for 'database "Assemblies" table '


New Around Here
Posts: 25
New Around Here
Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!
This got trimmed from above:-

assemblyIdentity name="HtmlSanitizer" publicKeyToken="61c49a1a9e79cc28"
bindingRedirect oldVersion="0.0.0.0-32767.32767.32767.32767" newVersion="9.0.0.0"
New Around Here
Posts: 25
New Around Here
Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!

In order to support the two versions of htmlsanitizer (DNN has started to use) and the older version ActionForm uses, web-config needs to be changed 

dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1"
   assemblyIdentity name="HtmlSanitizer" publicKeyToken="61c49a1a9e79cc28" 
    bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" 
    bindingRedirect oldVersion="6.1.0.0-32767.32767.32767.32767" newVersion="9.0.0.0" 
    codeBase version="6.0.0.0" href="bin\PlantAnApp\HtmlSanitizer.dll" 
   codeBase version="9.0.0.0" href="bin\HtmlSanitizer.dll"     
dependentAssembly

This assumes that the Actionform version is in bin\PlantanApp folder and its version is 6.0

Veteran Member
Posts: 349
Veteran Member
3 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
MVP
MVP
You're an MVP!
Engaged Reader
Engaged Reader
You are an engaged reader!
Avid Reader
Avid Reader
Avid Reader art thou!
The above workaround would work since it is in a different folder. However I would probably contact the module vendor to make them aware of the situation, it is a pretty big version gap and a moderate security issue has been reported on all versions but the latest from HtmlSanitizer. After analysis, the issue is not exposed by DNN usage of it, but I don't know on their usage, it is something they probably want to at least analyze and potentially bump.

These Forums are for the discussion of the open source CMS DNN platform and ecosystem.

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

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. 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.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved