• Resolved icedquick84

    (@icedquick84)


    Hi there,

    I am trying to add CSP directives via the Advanced Policies section of the plugin.

    I am able to add default, img, script, frame and form. But when I try add font or style I get an error that:

    NinjaFirewall fatal error : cannot retrieve user options from database (#1).

    Specifically I am adding:

    font-src 'self’ *.gstatic.com;
    style-src 'self’ *.youtube.com *.bootstrapcdn.com  *.googleapis.com;

    Using wp-db.php, I get the below diagnostic – any thoughts on how to fix?

    Attempting to connect to the DB: OK
    
    Attempting to read NinjaFirewall's options (nfw_options) from the DB: OK
    Calling fetch_object: OK
    Checking options integrity: Error: Unserialize failed
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author nintechnet

    (@nintechnet)

    In your example, you’re not using the quote character (', U+0027) after self, but the right single quote character (, U+2019).
    With quotes, it should be:
    font-src 'self' *.gstatic.com; style-src 'self' *.youtube.com *.bootstrapcdn.com *.googleapis.com;

    Thread Starter icedquick84

    (@icedquick84)

    Ah, I didn’t even see that. It’s always that one character!

    Thank you, I appreciate your effort on this one.

    Kind regards,

    IcedQuick

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Error: Unserialize failed – Adding CSP’ is closed to new replies.