• Resolved Adrian

    (@adriandw)


    After installing and activating the new SG Security plugin, I got 403 errors displaying PDFs using the excellent PDF.js viewer.

    The page linked above demonstrated the problem, but I have disabled the Lock and Protect System Folders so the page is now working as it should.

    The PDF is in the uploads folder so why is SG Security preventing access to it?
    Is it a bug or a restriction?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Elena Chavdarova

    (@elenachavdarova)

    Hello @adriandw,

    The reason why you get 403 error while loading the PDFs is in the way the plugin is displaying them.

    Inspecting your website code, we can see the plugin is loading its functions via iframe to an URL. The URL is towards PHP file which is not recommended.

    You can exclude the file requested by the plugin in order to get this working. The exact rules you should use are:

    <FilesMatch "viewer\.php">
    	<IfModule !mod_authz_core.c>
    		Allow from all
    	</IfModule>
    	<IfModule mod_authz_core.c>
    		Require all granted
    	</IfModule>
    </FilesMatch>

    They should be added to the wp-content directory under .htaccess file.

    Best Regards,

    Elena

Viewing 1 replies (of 1 total)
  • The topic ‘403 error displaying pdf’ is closed to new replies.