Merge pull request #11440 from monojp/w4y-patches

login form style fix, sprites css caching fix and extended security-related HTTP headers
This commit is contained in:
Marc Delisle 2015-08-29 07:31:50 -04:00
commit 2192acf343
3 changed files with 18 additions and 1 deletions

View File

@ -593,6 +593,22 @@ class PMA_Header
. $captcha_url
. ";"
);
// Re-enable possible disabled XSS filters
// see https://www.owasp.org/index.php/List_of_useful_HTTP_headers
header(
'X-XSS-Protection: 1; mode=block'
);
// "nosniff", prevents Internet Explorer and Google Chrome from MIME-sniffing a
// response away from the declared content-type
/// see https://www.owasp.org/index.php/List_of_useful_HTTP_headers
header(
'X-Content-Type-Options: nosniff'
);
// Adobe cross-domain-policies
// see http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html
header(
'X-Permitted-Cross-Domain-Policies: none'
);
PMA_noCacheHeader();
if (! defined('IS_TRANSFORMATION_WRAPPER')) {
// Define the charset to be used

View File

@ -894,6 +894,7 @@ form.login label {
form.login input[type=text],
form.login input[type=password],
form.login select {
box-sizing: border-box;
width: 14em;
}

View File

@ -11,7 +11,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
exit();
}
$bg = $_SESSION['PMA_Theme']->getImgPath() . 'sprites.png';
$bg = $_SESSION['PMA_Theme']->getImgPath() . 'sprites.png?v=' . urlencode(PMA_VERSION);
/* Check if there is a valid data file for sprites */
if (is_readable($_SESSION['PMA_Theme']->getPath() . '/sprites.lib.php')) {