4259 Commits

Author SHA1 Message Date
Yonas Habteab
e3a5112fa1 Auth: Persist session before refreshing current logged in user 2023-12-13 13:38:23 +01:00
Johannes Meyer
b23cbd796f Raise version to 2.12.1 2023-11-15 12:22:46 +01:00
Alexander Aleksandrovič Klimov
d3f64604a3
Support PHP 8.3 (#5137)
fixes #5136
2023-11-14 11:22:54 +01:00
Johannes Meyer
a2c143d75e Response: Only preserve showCompact for explicit redirects
In case of a `__SELF__` redirect, the client should still have
the parameter in the location and its preserved this way then.
2023-10-27 10:15:47 +02:00
Yonas Habteab
bcdad8c9b3 MigrationManager: Enhance how pgsql privileges are checked
For mysql it's just enough to check whether the privileges are granted
at database or table label, but for PostgreSQL it's necessary that the
privileges are granted at database and at table level.
2023-10-26 17:07:17 +02:00
Yonas Habteab
a99f685d15 Add missing pgsql USAGE privilege 2023-10-26 17:07:17 +02:00
Johannes Meyer
e5f6fc276a ActionController: Always reload window when redirecting to the login
This ensures that, if CSP is enabled, the newly created token on the
login is accepted by the browser. A small, but IMHO desired, side
effect is that the login now always appears in the default theme.

fixes #5126
2023-09-28 10:35:18 +02:00
Johannes Meyer
21d631ad7e Raise version to 2.12.0 2023-09-21 16:35:31 +02:00
Yonas Habteab
c3eef5f607 DbMigrationHook: Pad matching groups to the desired length before using them 2023-09-20 15:35:39 +02:00
Johannes Meyer
9c6d930e17 MigrationManager: Also check table privileges 2023-09-19 14:37:55 +02:00
Yonas Habteab
167ff54947 Enhance logging 2023-09-19 14:37:55 +02:00
Yonas Habteab
47b214ee1b Use PDO::fetchColumn() where applicable 2023-09-19 14:37:55 +02:00
Yonas Habteab
2505e79a2d DbMigration: Check for mysql collation name whether to check 2.11 is migrated 2023-09-19 14:37:55 +02:00
Yonas Habteab
dc738ec4ce DbMigrationHook: Adjust regex pattern & add missing argument docs 2023-09-19 14:37:55 +02:00
Yonas Habteab
96a6321569 DbMigration: Adjust usage of Database::getDb() 2023-09-19 14:37:55 +02:00
Yonas Habteab
fac3855a86 DbMigrationStep: Don't cache sql statements unnecessarily 2023-09-19 14:37:55 +02:00
Yonas Habteab
26cae8b882 Rename MigrationHook -> DbMigrationHook 2023-09-19 14:37:55 +02:00
Yonas Habteab
ce89d4a7cb Rename Common\DbMigration -> DbMigrationStep 2023-09-19 14:37:55 +02:00
Yonas Habteab
2657f032dc Allow to automatically fix missing grants & elevalte database users
Co-authored-by: Johannes Meyer
2023-09-19 14:37:55 +02:00
Yonas Habteab
12bc95099e Don't raise unhandled exceptions in menu context 2023-09-19 14:37:55 +02:00
Yonas Habteab
ac24c6d34b Don't traverse schema query if the last successfully migrated version is found 2023-09-19 14:37:55 +02:00
Yonas Habteab
73b1041816 Fix phpstan claims & php code sniffer errors 2023-09-19 14:37:55 +02:00
Yonas Habteab
a167b6d21a Rename migration list item classes 2023-09-19 14:37:55 +02:00
Yonas Habteab
821a6812ae Use EmptyState(Bar) classes where applicable 2023-09-19 14:37:55 +02:00
Yonas Habteab
13569a34b7 Check explicitly for false before raising an unknown error 2023-09-19 14:37:55 +02:00
Yonas Habteab
4b2784f85e Use Icinga Web as a component name 2023-09-19 14:37:55 +02:00
Yonas Habteab
2944ceaa52 Rename getSchemaQueryFor() & drop $version param 2023-09-19 14:37:55 +02:00
Florian Strohmaier
7e313c921a MigrationListItemMinimal: Customize markup for styling 2023-09-19 14:37:55 +02:00
Yonas Habteab
a00f094e10 Add extra collapsible container around error section 2023-09-19 14:37:55 +02:00
Yonas Habteab
ad02431bd1 Add extra class to outer item lists & render subject header in the error box 2023-09-19 14:37:55 +02:00
Yonas Habteab
192a21b668 Don't use strong tag to highlight unselectable items 2023-09-19 14:37:55 +02:00
Yonas Habteab
fb33a2097a Defferentiate migrations with no provided descriptions 2023-09-19 14:37:55 +02:00
Yonas Habteab
ce012dcdb2 Hook: Don't abort loading remaining hooks due to one broken hook
`Hook::all()` shouldn't abort loading the remaining hooks when one of
the provided hook is broken.
2023-09-19 14:37:55 +02:00
Yonas Habteab
15792fb59a Provide DbMigration hook & register when bootstrapping 2023-09-19 14:37:55 +02:00
Yonas Habteab
1da5487066 Introduce MigrationsController & add pending migrations list in about view 2023-09-19 14:37:55 +02:00
Yonas Habteab
85b63dd067 Introduce migration ListItem & ItemList classes 2023-09-19 14:37:55 +02:00
Yonas Habteab
81c9e5cfc5 Introduce MigrationManager class 2023-09-19 14:37:55 +02:00
Yonas Habteab
babc59437f Introduce base MigrationHook class & helpers 2023-09-19 14:37:54 +02:00
Yonas Habteab
21bde13274 Introduce database models required by migration hooks 2023-09-19 14:37:54 +02:00
Yonas Habteab
ab96f66e72 Add never return type to redirect methods 2023-09-07 15:33:39 +02:00
Johannes Meyer
36d4e6db29 Response: Fix backwards compatibilty for __CLOSE__
If the redirect target changes, `__CLOSE__` has no effect

fixes #5081
2023-09-07 13:51:55 +02:00
Eric Lippmann
b693369412 Fix class in Platform::hasOracleSupport() 2023-09-07 08:51:22 +02:00
Johannes Meyer
d8e313af6c JsonResponse: Fix documentation of sendResponse 2023-09-05 16:19:41 +02:00
Johannes Meyer
c027282d8c Test: Load a module's composer autoloader 2023-08-31 10:18:37 +02:00
Sukhwinder Dhillon
f283c81ed2 ActionController: Always read icingaweb config for csp
Method `$this->Config()` returns config based of current module.
2023-08-30 10:04:46 +02:00
raviks789
33b6c01fe2 Create fake session to write csp nonces to it
`Csp::createnonces()` writes to a window aware session and hence a fake base session
is created in `BaseTestCase::setUp()` method
2023-08-28 16:56:51 +02:00
raviks789
282b4d564a Add style element to SVGs
The ruleset returned by `Styleable::getStyle()` is added to the SVG.
2023-08-28 16:56:51 +02:00
raviks789
97a14d7b18 Modify Styleable to avoid using static inline styles
To prevent CSP violation the following changes has been made in `Styleable::class`:
1) `Styleable::getStyle()` method is modified to return `ipl\Web\Style::class`
2) `Styleable::additionalStyle` property type is changed to array
3) `Styleable::setAdditionalStyle()` parameter type is changed to array
2023-08-28 16:56:49 +02:00
raviks789
33a5f765b9 Use style element to create css class for dynamic inline style
The `style` element with `nonce` attribute is used to create css classes for
inline styles that are not static. This prevents Content-Security-Policy violations.
2023-08-28 16:40:33 +02:00
raviks789
459f4198c3 Replace static inline styles with css class
The static inline styles are replaced with css class to avoid Content-Security-Policy violations.
2023-08-28 16:30:12 +02:00