Kentico 12 - Macro signature issue.

Tomasz Czado asked on January 31, 2019 07:11

Hi

I have a huge problem with macros signing. I see dozens of errors in event log when opening just home page (as example). What I've tried already:

  • checked if CMSHashStringSalt is in web.config - it is
  • checked my user if I'm global administrator
  • reassign all the macros (with my own account)
  • reassign all the macros (with my own acocunt but where Macro signature identity was set to global administrator)

Error that I mostly get is:

Security check of the expression ' !IsTheCustomSite() && CurrentDocument.NodeAliasPath.ToLower().Contains("/hawaii") |(user)tczado|(hash)97d9fa9fd44df39f85748902b8cf2fd1fdf22e07f66da8e23fd132e93ebf9512' didn't pass. The signature is not valid.

I've reached out all ideas I had.

Recent Answers


Dražen Janjiček answered on January 31, 2019 09:56

We've seen this kind of issues when such macro expressions were executed within content before and after fields of widgets. Is that the case in your implementation?

0 votesVote for this answer Mark as a Correct answer

Tomasz Czado answered on January 31, 2019 10:00

Not only, I have them also in Visible property or for example in Text property of Static HTML web part. Anyway, how did you resolved it? When did it happen to you? Was after kentico upgrade process?

0 votesVote for this answer Mark as a Correct answer

Dražen Janjiček answered on January 31, 2019 10:07

It was actually an existing Kentico 11 installation. We moved away from using Static Text web parts for those widgets and created custom user controls, which contain the required logic. We could not figure out any way to solve it. We manually removed the signatures from the XML, but each time we re-signed all macro signatures, the same errors re-appeared again.

0 votesVote for this answer Mark as a Correct answer

Tomasz Czado answered on January 31, 2019 10:08

Ok, but did you resolved that issues or it's not resolved yet?

0 votesVote for this answer Mark as a Correct answer

Dražen Janjiček answered on January 31, 2019 10:12

No, we didn't. Like I said, we created custom user controls instead, so we don't need to use the content before and after fields for conditional logic.

See also: https://devnet.kentico.com/questions/if-macros-security-issue-in-widgets-(portal-engine)

0 votesVote for this answer Mark as a Correct answer

Rui Wang answered on January 31, 2019 16:52

Are you doing MVC? Or may have multiple web code based connected to the same data base? Make sure all the web.config files share the same CMSHashStringSalt.

0 votesVote for this answer Mark as a Correct answer

Tomasz Czado answered on January 31, 2019 18:50

We've checked CMSHashStringSalt and it seems to be ok.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.