XF 2.2 Can't change any node permissions

TheLaw

Well-known member
I enountered a problem where I could not modify any node permissions after moving to a new server. Turned off all add-ons, defaulted the forum to the default theme and received the following error:

Oops! We ran into some problems.
Oops! We ran into some problems. Please try again later. More error details may be in the browser console.


So I looked in the browser console. I've never encountered this issue before and I'm surprised that this would appear as well.

The Content Security Policy (CSP) prevents the evaluation of arbitrary strings as JavaScript to make it more difficult for an attacker to inject unathorized code on your site.

To solve this issue, avoid using eval(), new Function(), setTimeout([string], ...) and setInterval([string], ...) for evaluating strings.

If you absolutely must: you can enable string evaluation by adding unsafe-eval as an allowed source in a script-src directive.
⚠️ Allowing string evaluation comes at the risk of inline script injection.

1 directive

Source location Directive Status
script-src blocked
 
Mod Security perhaps?
Bingo. Had to be fixed as follows:

edit modsec.conf

<IfModule mod_security2.c>
SecRuleRemoveById [enter ruleid]
</IfModule>

And thank you for the response, much appreciated. I've moved hosting and this came up. Hope that this info might help others but it does come with its own caveat.
 
Last edited:
Back
Top Bottom