do NOT load categories.php?app=phpgw for login page

It gives an error as no user is logged in, which is served as text/html, which then gives an error in browser, as it conflicts with X-Content-Type-Options: nosniff
This commit is contained in:
Ralf Becker 2020-01-28 18:56:54 +01:00
parent 57ab6f667c
commit ec31d93af2

View File

@ -96,7 +96,7 @@ abstract class Framework extends Framework\Extra
/** /**
* Factory method to instanciate framework object * Factory method to instanciate framework object
* *
* @return egw_framwork * @return self
*/ */
public static function factory() public static function factory()
{ {
@ -932,7 +932,10 @@ abstract class Framework extends Framework\Extra
self::includeCSS($theme_min_css); self::includeCSS($theme_min_css);
// Global category styles // Global category styles
Categories::css(Categories::GLOBAL_APPNAME); if (basename($_SERVER['PHP_SELF']) !== 'login.php')
{
Categories::css(Categories::GLOBAL_APPNAME);
}
} }
else else
{ {
@ -949,7 +952,10 @@ abstract class Framework extends Framework\Extra
self::includeCSS('/api/templates/default/etemplate2.css'); self::includeCSS('/api/templates/default/etemplate2.css');
// Category styles // Category styles
Categories::css(Categories::GLOBAL_APPNAME); if (basename($_SERVER['PHP_SELF']) !== 'login.php')
{
Categories::css(Categories::GLOBAL_APPNAME);
}
self::includeCSS($theme_css); self::includeCSS($theme_css);