Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Dylan

    (@dyland)

    Have a look at your browser’s developer console, see what errors are displayed there. The browser should say whether it is in report-only mode. You can also check network traffic (again through the developer console) as there should be one call per rejected item.

    Same problem here, switched 5 sites to SSL last Friday and they all use v1.3 of the plugin and no violations are being logged at all despite me even forcing violations. On all existing SSL sites I set up 2-3 months ago it logs perfectly.

    Found the problem. v1.3 is not creating the database table for logging. Easily fixed by running.

    CREATE TABLE wp_wpcsplog (
    id mediumint(9) NOT NULL,
    violated_directive varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
    blocked_uri varchar(1024) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
    document_uri varchar(1024) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
    useragent varchar(1024) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
    remoteaddress varchar(1024) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
    information text COLLATE utf8mb4_unicode_ci NOT NULL,
    createdon timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

    Plugin Author Dylan

    (@dyland)

    The table should create on activation…perhaps I need more error checking around the insert to handle the possibility the table doesn’t exist.

    I haven’t converted a site to SSL yet, I have one converting tomorrow and will look at why it might be not logging on SSL (if its not related to the create table issue).

    Plugin Author Dylan

    (@dyland)

    I just released version 1.4 which will auto-recreate the table if it’s missing. It does this when the admin screens are accessed.

    I also tested SSL and it works OK.

    Logging doesn’t work for me either. I created the table manually, but no log entries appear. I’m using wordpress 4.7.1

    After investigating a bit, I could see that line 106 in includes/wpCSPclass.php, after $data = file_get_contents('php://input'); data is empty. Therefore no logging, I guess, but in the browser console is stated that a CSP report was sent.

    Any hints? I would really appreciate to use that smart plugin.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘no log’ is closed to new replies.