Quoting bug
-
Hello,
there is a little bug in the plugin.
1)
In referrer policy, values are extra quotedFor example in chrome it says:
Failed to set referrer policy: The value ‘”origin”‘ is not one of ‘no-referrer’, ‘no-referrer-when-downgrade’, ‘origin’, ‘origin-when-cross-origin’, ‘same-origin’, ‘strict-origin’, ‘strict-origin-when-cross-origin’, or ‘unsafe-url’. The referrer policy has been left unchanged.The solution probably is to replace this:
return $htaccess ? ‘Referrer-Policy “‘.$policy.'”‘ : ‘Referrer-Policy: “‘.$policy.'”‘;by this:
return $htaccess ? ‘Referrer-Policy ‘.$policy : ‘Referrer-Policy: ‘.$policy;in core/objects/core.headers.php file
2)
http headers values should not be quoted as well. I. e. the latter one is correct. I think the first might not be understood by a web browsers:strict-transport-security: “max-age=31536000” strict-transport-security: max-age=315360003)
Also, how about adding “preload” option for “strict-transport-security” header?thanks!
The topic ‘Quoting bug’ is closed to new replies.