Commit Graph

4203 Commits

Author SHA1 Message Date
Johannes Meyer 24c1618793 LoginForm: Also disable stay logged in case of no encryption method 2021-08-10 10:09:15 +02:00
Johannes Meyer a00166f15b Javascript: Enhance optimization
* Don't try to optimize non-icinga define calls
* Don't optimize `exports` dependency
* Log errors to debug log, it's stuff for devs
2021-08-10 09:23:45 +02:00
Sukhwinder Dhillon 8c22514758 Utilize multiple encryption ciphers for remember me 2021-08-09 16:58:58 +02:00
Johannes Meyer 907f7826b2 Release version 2.9.2 2021-07-28 09:33:41 +02:00
Johannes Meyer 0b6f71c446 If enforcing a charset, DO IT ONLY IF THE DB TYPE IS CORRECT 2021-07-28 09:04:28 +02:00
Johannes Meyer 1b2cd8fdf3 Release version 2.9.1 2021-07-27 15:22:32 +02:00
Sukhwinder Dhillon 645c0770a2
Rememberme compatibility with php version 5.6+ (#4472) 2021-07-26 17:37:38 +02:00
Johannes Meyer aee82ad342 Database: Always use `utf8mb4` as connection charset 2021-07-26 16:37:41 +02:00
Johannes Meyer 62f1fe2c3f PreferencesStore: Always use `utf8` as db connection charset 2021-07-26 16:37:41 +02:00
Johannes Meyer 517c108cc4 UserGroupBackend: Always use `utf8` as db connection charset 2021-07-26 16:37:41 +02:00
Johannes Meyer 7ce3778378 UserBackend: Always use `utf8` as db connection charset 2021-07-26 16:37:35 +02:00
Johannes Meyer 7b9cb7f9fb SVGRenderer: Set correct input encoding
fixes #4462
2021-07-26 11:57:45 +02:00
Johannes Meyer c38a7b5cf3 css: Disable login orb animation and all orbs for themes
fixes #4437
2021-07-26 11:54:28 +02:00
Johannes Meyer b8b77332c4 Database: Only use `PDO::MYSQL_ATTR_INIT_COMMAND` for mysql connections
fixes #4441
2021-07-21 09:19:43 +02:00
Johannes Meyer b39d9d6746 LinkTransformer: Don't open external urls in iFrames
fixes #4449
2021-07-21 09:17:23 +02:00
Johannes Meyer f73614be4d Raise version to 2.9.0 2021-07-12 10:35:56 +02:00
Johannes Meyer 1fd00dcf1c We drop support for the `INI` config backend type with v2.11 2021-07-12 10:35:56 +02:00
Johannes Meyer 228e503131 js: Allow to reload the window 2021-07-07 09:41:48 +02:00
Johannes Meyer 9e0785b0b4 AppHealth: Fix typo 2021-07-06 15:18:16 +02:00
Johannes Meyer ff30bf2393 IcingaCheckbox: Use css class `sr-only` again
`hidden=true` also hides elements from screen readers.
`sr-only` is now fixed for chrome.
`aria-hidden` true has been added because it suits
and was previosly missing.

fixes #4411
2021-07-01 11:16:55 +02:00
Johannes Meyer 53c0d6de86 Wizard: Transform emtpy page data values to null
Previously the wizard wrote empty strings to config files.
2021-06-30 18:53:41 +02:00
Johannes Meyer 2be1ed3878
Merge pull request #4400 from Icinga/feature/username-in-navigation-items
Support $user.local_name$ macro in navigation items
2021-06-29 12:55:12 +02:00
Eric Lippmann d1aaaf7fb0 Replace user:local_name with user.local_name macro in restrictions 2021-06-28 15:16:56 +02:00
Eric Lippmann 7e7e2415dc Support $user.local_name$ macro in navigation items 2021-06-28 14:26:38 +02:00
Johannes Meyer 889c0a749c Module: Report `ipl` and `reactbundle` as library requirements
This way modules with the legacy requirement definition
can still be enabled without the modules in place.
2021-06-28 10:55:45 +02:00
Johannes Meyer 82485236f7 Auth: Also reload theme mode if no theme is active
refs #4390
2021-06-24 09:44:28 +02:00
Johannes Meyer b59f26879e LessParser: Add custom function `extract-variable-default` 2021-06-23 17:40:06 +02:00
Sukhwinder Dhillon 492a9ec229 Auth: Reload CSS if mode change 2021-06-23 17:34:27 +02:00
Sukhwinder Dhillon 8b24e3bffe Stylesheet: Collect and load theme mode files 2021-06-23 17:34:27 +02:00
Sukhwinder Dhillon b291d7ce3d Add new less lib 2021-06-23 16:13:49 +02:00
Johannes Meyer 6a0da10473 Manager: Don't register the ipl and reactbundle module
Both are superseded by their respective library. This
way we make sure there are no competing auto loaders.
2021-06-22 12:50:59 +02:00
Johannes Meyer bc88e8d62b SingleValueSearchControl: Use strict interfaces..
..to construct ipl\Html objects
2021-06-21 16:11:55 +02:00
Johannes Meyer ed009bb032 PrivilegeAudit: Use strict interfaces to contruct ipl\Html objects 2021-06-21 16:11:30 +02:00
Johannes Meyer f400f4d96d AppHealth: Use strict interfaces to construct ipl\Html objects 2021-06-21 16:10:55 +02:00
Johannes Meyer 35659c8d51
Merge pull request #4391 from Icinga/improve-cache-handling
Improve cache handling
2021-06-18 13:57:30 +02:00
Johannes Meyer 0756797fbb Make configuration of custom user-group backends possible
refs #2840
2021-06-18 10:41:39 +02:00
Gianluca Piccolo 1e7f700102 Make configuration of custom user backends possible
refs Icinga/icingaweb2#2840
2021-06-18 10:28:35 +02:00
Johannes Meyer 870c3e0e5b Force clients to ask us if their cached CSS is valid 2021-06-16 14:58:44 +02:00
Johannes Meyer 1ada53539c Force clients to ask us if their cached JS is valid 2021-06-16 14:57:14 +02:00
Johannes Meyer 81c0613e68 Library: Add missing shut-up operator to `file_get_contents` call 2021-06-16 11:57:00 +02:00
Johannes Meyer 0d6da2d859 error/error: Check web2's deps and enhance lib checks 2021-06-07 09:40:40 +02:00
Johannes Meyer 6e3ad08aef Zend: Fix `array_walk_recursive` pass by reference error on PHP8
refs #4287
2021-06-02 11:24:01 +02:00
Johannes Meyer 4e3811cc84 Module: Allow `/` and `-` in module/library dependency names 2021-06-01 09:14:28 +02:00
Johannes Meyer 229e24519a
Merge pull request #4376 from Icinga/utilize-ipl-i18n-4366
Utilize ipl-i18n
2021-06-01 09:13:45 +02:00
Johannes Meyer 4fc78a4cfd ApplicationBootstrap: Change default library path
from: `/usr/share/php-Icinga`
to: `/usr/share/icinga-php`
2021-05-31 10:17:35 +02:00
Johannes Meyer dcb619e62a Translator: Add deprecation notice and use ipl-i18n internally 2021-05-28 14:03:36 +02:00
Johannes Meyer f363bf5bf6 BaseTestCase: Setup `ipl\I18n\StaticTranslator::$instance` 2021-05-28 14:03:36 +02:00
Johannes Meyer db1fea6331 Web: Detect preferred locale using ipl-i18n 2021-05-28 14:03:36 +02:00
Johannes Meyer 84757111d1 ApplicationBootstrap: Deprecate method `listLocales()` 2021-05-28 14:03:36 +02:00
Johannes Meyer 2e5abbc832 Use ipl-i18n's `Translation` trait where applicable 2021-05-28 14:03:36 +02:00
Johannes Meyer cb92e86b99 functions: Use ipl-i18n in functions `t`, `tp`, `mt` and `mtp` 2021-05-28 14:03:36 +02:00
Johannes Meyer 8137f1546f Module: Register locales using ipl-i18n 2021-05-28 14:03:36 +02:00
Johannes Meyer bfd2449e5d bootstrap: Setup internationalization using ipl-i18n 2021-05-28 14:03:36 +02:00
Florian Strohmaier 24c1bb1f8c IcingaCheckbox: Add `hidden attribute to input element
refs #4310
2021-05-25 17:09:51 +02:00
Eric Lippmann 68acf12407
Remember me (#4112)
Co-authored-by: Sukhwinder Dhillon <sukhwinder.dhillon@icinga.com>
2021-05-21 15:43:06 +02:00
Johannes Meyer 162d898d42 js: Introduce `DatetimePicker` behavior
Utilizes `flatpickr` from ipl-web.
2021-05-17 13:20:42 +02:00
Johannes Meyer a87f15c861 Auth: Reload entire layout if the locale changes 2021-05-17 13:20:42 +02:00
Johannes Meyer 0da4a11d91
Merge pull request #4355 from Icinga/health-endpoint
Health endpoint
2021-05-17 13:11:51 +02:00
Johannes Meyer cb4e6011f3 js: Remove jquery-migrate 2021-05-17 10:44:27 +02:00
Johannes Meyer 0d2bf1ae33 Menu: Integrate health endpoint 2021-05-14 15:45:35 +02:00
Johannes Meyer 5e382dcfa9 Introduce health endpoint /health[/checks] 2021-05-14 15:45:35 +02:00
Johannes Meyer 197f42557a Markdown: Allow to pass purifier config and provide a default 2021-04-27 13:17:44 +02:00
Johannes Meyer 5f8704e635 Introduce class `Icinga\Web\Helper\Markdown\LinkTransformer` 2021-04-27 13:17:44 +02:00
Johannes Meyer 065915397a zend: PHP 8 compatiblity changes
`ReflectionClass::newInstanceArgs()` seems to respect string keys
since PHP 8.

refs #4289
2021-04-14 10:51:38 +02:00
Johannes Meyer d9a87f76a2 AdmissionLoader: Optimize role loading 2021-04-14 10:11:19 +02:00
Johannes Meyer 384d9535a9 ArrayDatasource: Sort result first and then apply limit+offset 2021-04-12 15:42:20 +02:00
Bas Couwenberg dc7a8c8d8b
Update JShrink for PHP 8 support. (#4298)
refs #4287
2021-04-09 14:45:17 +02:00
Johannes Meyer e671324ddb tests: Don't use deprecated assertion `assertRegExp()` 2021-04-09 12:38:43 +02:00
Johannes Meyer bc1c967dec BaseTestCase: Inherit from `Mockery\Adapter\Phpunit\MockeryTestCase` 2021-04-09 12:38:43 +02:00
Johannes Meyer cb87190138 tests: Add `:void` return type declarations 2021-04-09 12:38:43 +02:00
Alexander A. Klimov eff10ec613 ApplicationBootstrap#setupErrorHandling(): migrate error handler to PHP 8
... as recommended here:
https://www.php.net/manual/de/migration80.incompatible.php

refs #4287
2021-04-09 12:37:03 +02:00
Johannes Meyer 0d35a1774d SingleValueSearchControl: Add failure message for empty results 2021-04-07 15:59:03 +02:00
Johannes Meyer a6507daaaf SingleValueSearchControl: Allow to pass html as labels 2021-04-07 15:58:25 +02:00
Johannes Meyer 314ec5256c PrivilegeAudit: Show missing initiators in inheritance paths 2021-04-07 14:30:14 +02:00
Johannes Meyer b5334a063e PrivilegeAudit: Show missing restrictions if only parents restrict 2021-04-07 14:30:14 +02:00
Johannes Meyer 698e7bcfa4 SingleValueSearchControl: Show magnifier icon in the text input 2021-04-07 14:30:14 +02:00
Johannes Meyer 074f08db4e Introduce view `Icinga\Web\View\PrivilegeAudit` 2021-04-07 14:30:14 +02:00
Johannes Meyer ab90b3e0a1 Role: Add param `$cascadeUpwards` also to public method `grant()` 2021-04-07 14:30:14 +02:00
Johannes Meyer 9d10424f97 AdmissionLoader: Set additional user information `assigned_roles` 2021-04-07 14:30:14 +02:00
Johannes Meyer f4da973f68 Auth: Only reload CSS upon login if the theme **really** changed
fixes #2233
2021-04-07 14:30:14 +02:00
Johannes Meyer 0aa4e25723 Auth: Introduce method `setupUser()`
This was previously part of method `setAuthenticated()`.
Split up to allow external usage.
2021-04-07 14:30:14 +02:00
Johannes Meyer 153e9b4ade SingleValueSearchControl: Add support for groups and meta data 2021-04-07 14:30:14 +02:00
Johannes Meyer 42bdbe38b1 Introduce class `Icinga\Web\Widget\SingleValueSearchControl` 2021-04-07 14:30:14 +02:00
Johannes Meyer a4a658974d AuthBackendController: Inherit from `ipl\Web\Compat\CompatController` 2021-04-07 14:30:14 +02:00
Johannes Meyer 8b0fd4daaf FilterEditor: Merge preserved query params as encoded params
This way the query param values are not encoded twice.

fixes #4321
2021-03-30 10:30:57 +02:00
Johannes Meyer 0fc06d7795 Transform `*` equal/unequal comparisons to NULL checks
This comes from https://github.com/Icinga/ipl-sql/pull/31
2021-03-12 09:50:59 +01:00
Johannes Meyer 5dfa5e28da User: Add property `$unrestricted` 2021-03-09 11:27:13 +01:00
Johannes Meyer 8c147c1b2f css: Remove left-over styles from tipsy 2021-03-09 08:58:48 +01:00
Johannes Meyer 59e6ec4035 JavaScript: Ensure that `$baseFiles` are loaded first if minified 2021-03-09 08:52:10 +01:00
Johannes Meyer 4a2ab4740c JavaScript: Enhance `DEFINE_RE` to broaden supported syntaxes 2021-03-09 08:52:10 +01:00
Johannes Meyer d6722c7772 LdapQuery: Compare multi-valued attributes as rfc2891 suggests 2021-02-23 08:22:58 +01:00
Johannes Meyer 6a5e12af04 LdapUserGroupBackend: Properly handle multi-valued names 2021-02-23 08:22:58 +01:00
Johannes Meyer 4d4f5b3a69 js: Don't serve scripts utilizing ECMA2016+ features
i.e. library javascript assets
2021-02-22 16:01:42 +01:00
Johannes Meyer 64d1574972 JavaScript: Load minified library assets if available 2021-02-22 15:09:59 +01:00
sukhwinder33445 ab97b6fdf0
Enforce database as configuration backend (#4135) 2021-02-18 12:31:21 +01:00
Johannes Meyer 91d4669dcb
Merge pull request #4285 from Icinga/bugfix/curl-monitoring-service-show-4281
CheckNowCommandForm#init(): set submit label
2021-02-18 12:21:50 +01:00
Johannes Meyer 16be5f9572 Form: Add some todos regarding the handling of "api targets"
I've added them only for our future "migration" to `ipl\html\Form`.
We MUST NOT migrate this flawed handling of API targets.
2021-02-18 12:16:43 +01:00
Johannes Meyer cc65164a67 Adjust global permissions 2021-02-18 11:11:39 +01:00
Johannes Meyer 429a70f05f Auth: Allow to ignore any and all restrictions 2021-02-18 11:11:39 +01:00
Johannes Meyer 6eb0139446 User: Move `$user:local_name$` handling to class `AdmissionLoader`
This way it also adjusts the roles directly, and not just their
copies for the user object
2021-02-18 11:11:39 +01:00
Johannes Meyer bdd0f204f0 Auth: Support single inheritance in roles 2021-02-18 11:11:39 +01:00
Johannes Meyer 87d741265e Auth: Add support for denied permissions 2021-02-18 11:11:39 +01:00
Johannes Meyer c0541d70e9 Move permission match code from class `User` to `Role` 2021-02-18 11:11:39 +01:00
Johannes Meyer 60d61a8fe7 Response: Only apply `showCompact=1` to redirects for GET requests 2021-02-09 15:59:42 +01:00
Johannes Meyer f4a8599193 Introduce and utilize class `Icinga\Util\LessParser` 2021-01-25 09:15:53 +01:00
Johannes Meyer 500696c767 Response: Set `showCompact=1` on a redirect url..
..if compact layout has been requested.

refs #4164
fixes Icinga/icingadb-web#125
2021-01-15 16:50:00 +01:00
Johannes Meyer accbd9d847 ApplicationStateController: Initalize `$autorefreshInterval`
Instead of defining it with the setter. This prevents the
user's preferences from having an effect on this route.
2021-01-15 15:08:48 +01:00
Johannes Meyer f1dd69d877 ActionController: Set autorefresh interval on view as late as possible
This allows to initialize property `$autorefreshInterval` and have it
take an effect on non-XHR requests.
2021-01-15 15:08:48 +01:00
Johannes Meyer 765557af69 ActionController: Drop new param in method `setAutorefreshInterval()` 2021-01-15 15:08:48 +01:00
Johannes Meyer 67de8a079a js: Initialize all types of input enrichments 2021-01-14 11:57:24 +01:00
Johannes Meyer cb24eafdb5 JavaScript: Load behavior `complete.js` 2021-01-14 11:57:05 +01:00
Johannes Meyer cb9ccc68f7 Url: Drop unwanted boolean parameters in method `onlyWith()` 2021-01-13 17:20:22 +01:00
Sukhwinder Dhillon 53388a3940 Change __toString() to get encoded url string 2020-12-07 13:27:14 +01:00
Johannes Meyer 7c58b3ced1 LessCompiler: Add support for variable exports by modules
Using the following in a module's less file:

```
@exports: {
  @foo: "bar";
  @number: 4;
  @color: red;
};
```

will export the variables `@foo`, `@number` and `@color` into the global
scope. Though, exports are not able to override already defined variables.
That's still reserved for themes.
2020-12-02 10:51:01 +01:00
Johannes Meyer a33317aeab Module: Don't emit warnings for module assets
resolves #4286
2020-12-01 09:44:56 +01:00
Johannes Meyer 629a39ebbe Cli/Loader: Configure the used `Screen` to use STDERR
Otherwise we still colorize output if stderr is being
redirected.
2020-11-30 15:35:20 +01:00
Alexander A. Klimov d7e3547c6e CLI: write errors to stderr 2020-11-30 15:35:20 +01:00
Alexander A. Klimov 81b19285a7 Make auto refresh interval configurable
refs #2819
2020-11-26 11:38:02 +01:00
Johannes Meyer 6956ec4450 Manager/Libraries: Don't try to compare versions if any version is sufficient 2020-11-24 15:31:11 +01:00
Johannes Meyer 79478fd2e1 Libraries: Return partial matches in method `get()`
This allows to reference libraries with only their
project name, not just together with the organisation
name.
2020-11-18 16:52:22 +01:00
Johannes Meyer be99703a67 Module: Deprecate asset support 2020-11-18 13:21:34 +01:00
Johannes Meyer a370a99fb4 cli: Allow to ignore module dependencies with `module enable --force` 2020-11-18 13:21:34 +01:00
Johannes Meyer 40c97d6a3e Libraries: Add method `get($name)` 2020-11-18 13:21:34 +01:00
Johannes Meyer 28c7c41b55 Manager: Don't enable modules which have unmet dependencies 2020-11-18 13:21:33 +01:00
Johannes Meyer aba8c4a8ba Manager: Add method `hasUnmetDependencies($name)` 2020-11-18 13:21:33 +01:00
Johannes Meyer baaf663db3 Module: Introduce new metadata field `Requires`
This is the successor of `Depends` and allows to
define dependencies for libraries and modules:

`Requires: <lib-name>[ (<ver>)][, <lib-name>[ (<ver>)]] ...`

or

```
Requires:
  Libraries: <name>[ (<ver>)][, <name>[ (<ver>)]] ...
  Modules: <name>[ (<ver>)][, <name>[ (<ver>)]] ...
```
2020-11-18 13:21:33 +01:00
Johannes Meyer 99b620983a Manager: Add method `has($name, $version = null)` 2020-11-18 13:21:33 +01:00
Johannes Meyer 0f485f1257 Libraries: Add method `has($name, $version = null)` 2020-11-18 13:21:33 +01:00
Johannes Meyer e9fa9d95dd JavaScript: Also optimize `define()` calls in module JS 2020-11-18 13:21:33 +01:00
Johannes Meyer 19e4eb6e1e Module: Add missing getter for property `jsdir` 2020-11-18 13:21:33 +01:00
Johannes Meyer 5a38977906 js: Add `define.js` 2020-11-18 13:21:33 +01:00
Johannes Meyer 220044277c webrouter: Serve lib assets at `lib/<lib-name>/<asset-path>` 2020-11-18 13:20:09 +01:00
Johannes Meyer ed7763c379 Introduce class `Icinga\Web\Controller\StaticController` 2020-11-18 13:20:09 +01:00
Johannes Meyer e44ea3b34c Introduce class `Icinga\Application\StaticWeb` 2020-11-18 13:20:09 +01:00
Johannes Meyer a9d6482533 Javascript: Load JS assets from loaded libraries 2020-11-18 13:20:09 +01:00
Johannes Meyer c49a811fb5 Library: Add getters for the different asset paths 2020-11-18 13:20:09 +01:00
Johannes Meyer ad9099509d StyleSheet: Load css assets from loaded libraries 2020-11-18 13:20:09 +01:00
Johannes Meyer c2769bd177 Library: Add accessors for assets 2020-11-18 13:20:09 +01:00
Johannes Meyer 84c23fe92b Library: Add accessors for meta data 2020-11-18 13:20:09 +01:00
Johannes Meyer a60f511cfc bootstrap: Load external libraries 2020-11-18 13:20:09 +01:00
Johannes Meyer a2bdc8074f Introduce classes `Libraries` and `Library` 2020-11-18 13:20:09 +01:00
Alexander A. Klimov 74d5d69085 Url::fromPath(): var_export() input value to complain about
... not to hide its type.
2020-11-18 09:40:44 +01:00
Johannes Meyer d918d6c86f
Merge pull request #4235 from Icinga/fix/sparkline-js-performance
Drop sparkline.js and render inline-pies as SVG
2020-11-18 09:37:31 +01:00
Jorge Vallecillo 865e4b9b2a Fix typos: consecutive use of 'the' 2020-11-18 09:26:39 +01:00
Johannes Meyer 7c1886430b Controller: Don't accept `0` as default page limit 2020-11-16 13:29:49 +01:00
Johannes Meyer 8c73f0462e InlinePie: Utilize SVG to render charts instantly
Inline pie charts usually don't contain that much
data and the SVG should be rather small in size.
So it doesn't hurt rendering them instantly.
2020-09-28 16:40:39 +02:00
Johannes Meyer 37fb455977 js: Drop sparkline lib and behavior 2020-09-28 16:39:54 +02:00
Johannes Meyer 77244b2c1b Raise version to v2.8.2 2020-08-19 11:03:31 +02:00
Johannes Meyer c3d329bd48 Raise version to 2.8.1 2020-06-29 10:30:58 +02:00
Johannes Meyer b288d86e91 DbQuery: Return non-string args as is in `valueToTimestamp()`
fixes #4182
2020-06-24 14:09:13 +02:00
Johannes Meyer 4d173e6746 DbUserBackend: Lowercase usernames before fetching password hashes
The BINARY cast to make trailing spaces significant (#4030) also
made these queries case-sensitive. This wasn't identified at the
time because the query itself wasn't case-insensitive, but the
default collation on the `name` column. (Tests sometimes are the
perfect mitigation for this...)

fixes #4184
2020-06-24 14:08:30 +02:00
Johannes Meyer e95fac3ff1 Raise version to 2.8.0 2020-06-08 10:51:35 +02:00
Johannes Meyer 62dd0b3f1e ActionController: Fix that view variable `compact` is undefined
refs #4164
2020-06-08 09:26:36 +02:00
Johannes Meyer a240e306ed Preserve/Remove param `showCompact` instead of `view` 2020-06-04 08:50:41 +02:00
Johannes Meyer 6cf9f19048 ActionController: Shift parameter `view` if its value is `compact` 2020-06-04 08:50:41 +02:00
Johannes Meyer 60c3fd6406 FilterEditor: Use a new url from request when redirecting searches
Creating a new url has the benefit that all framework params are
still there. `$this->url()` however returns a url that's already
mangled and parameter preservation does not work for framework
params.

This is not quite the correct fix. But the entire parameter
handling here is way too convoluted.
2020-06-04 08:50:41 +02:00
Johannes Meyer 46c6201a21 Url: Add method `onlyWith()` 2020-06-04 08:50:41 +02:00
Eric Lippmann 49eb245580 CLI: Also register assets
Because assets are not registered in the CLI context,
CLI actions cannot access the full style sheet.
This is necessary for Icinga Reporting though in order to send PDF reports.
2020-06-04 07:31:02 +02:00
Eric Lippmann fce2858beb LDAP: Add option to disable server side sorting
We automatically detect whether the server supports server side sorting
and sort manually if that is not the case. But there are LDAP servers
which report that they support this feature in general but have it
disabled for certain fields.

If we send the server side control for any field that has server side
sort disabled, the LDAP server will abort the query.

With the new configuration option it is possible to disable server side
sorting and it has precedence over our automatic detection.
Since this is a very special LDAP server configuration, there is no GUI
option for this.
2020-05-25 11:08:13 +02:00
Johannes Meyer c2f380cf9b Dashlet: Use `showCompact` instead of `view=compact`
Allows dashlets to use their own value for parameter `view`
2020-05-19 16:46:58 +02:00
Johannes Meyer c40d134ea5 ApplicationBootstrap: Use L10n locales in `getLocaleDir()` if available 2020-05-11 17:05:23 +02:00
Johannes Meyer 8b8094e9cc dashboards: Increase size of dashlets in no-js envs 2020-04-15 09:42:36 +02:00
Johannes Meyer 5ed41868d9 css: Fix no-script apply styles in non-inline forms 2020-04-15 09:42:36 +02:00
Alexander A. Klimov 568619b92e Form: allow checkboxes to be required 2020-04-09 14:03:21 +02:00
Feu Mourek c2568548cf Add appropriate aria labels to donut graphs 2020-04-09 08:36:29 +02:00
Johannes Meyer d72bdc2c32 Raise version to 2.8.0-rc1 2020-03-13 10:40:35 +01:00
Eric Lippmann e11feb81f5 Don't fail with an exception if module.info is flawed 2020-03-12 14:26:15 +01:00
Eric Lippmann 3361cac59a CLI: Setup fake auth
Since version 2.7.x CLI actions load all enabled modules automatically.
This includes launching configuration.php and run.php. Though code
in those files should be restricted to a supported set of functions,
module devs may write any code here. If a module requires authentication
in those files, CLI actions fail because there is no auth possible.
With this patch, we setup a fake user named "cli" w/o any permission when
running CLI actions.
2020-03-02 14:16:28 +01:00
Eric Lippmann 990a5e4d61 Introduce Auth::setUser() 2020-03-02 14:15:53 +01:00
Johannes Meyer 3a66b0a950 FilterExpression: Pass used delimiter to `preg_quote`
fixes #4090
2020-03-02 08:39:46 +01:00
Johannes Meyer eb674509b4 BaseTestCase: Read db host and port from env vars if available 2020-01-21 14:13:15 +01:00
Johannes Meyer 05135e716e
Merge pull request #4049 from Icinga/fix/pdfexport-hooks-may-cause-bad-loading-times
Fix pdfexport hooks may cause bad loading times
2020-01-16 09:02:31 +01:00
Johannes Meyer 69d15824fb
Merge pull request #4048 from Icinga/fix/server-side-window-handling
Fix server side window handling
2020-01-16 08:57:11 +01:00
Eric Lippmann 73a4d8ac31 WebBaseHook: Make setView() fluent 2020-01-14 16:06:22 +01:00
Eric Lippmann dd500578c9 Url: Fix @return hints
Before, sublcasses of Url suffered from @return Url hints. This is
@return static now.
2020-01-14 14:26:14 +01:00
Johannes Meyer 8da37e5ca2
Merge pull request #4044 from Icinga/fix/pdf-export-error-handling
Fix pdf export error handling
2020-01-14 11:13:01 +01:00
Johannes Meyer 6a8f17faf2 OutputFormat: Just provide the pdf export if there's a hook available
Calling `isSupported()` is bad here since there may be IO involved.
2020-01-14 11:01:53 +01:00
Johannes Meyer 29aaa363b4 Pdf: Utilize an pdfexport hook without calling `isSupported()`
If it's not supported, users should disable the module. If there
are multiple hooks supported at some point we need to touch this
again anyways. So that should suffice for now.
2020-01-14 10:59:01 +01:00
Johannes Meyer 9fe43dda5f ActionController: Drop method `handlerBrowserWindows()` 2020-01-14 10:14:02 +01:00
Johannes Meyer 855bb8ae72 Properly handle window id's and container id's 2020-01-14 10:14:02 +01:00
Johannes Meyer 2d3fc218db Window: Differentiate between window and container id 2020-01-14 10:14:02 +01:00
Johannes Meyer d459e58aca Response: Add methods to override the client's window id 2020-01-14 10:14:02 +01:00
Johannes Meyer 098bcfb98f LdapConnection: Ignore unknown vendor upon inspection 2020-01-13 13:46:32 +01:00
Johannes Meyer 7bb9c8e25f LdapConnnection: Don't pass param `$serverCtrls` to `ldap_search` prior php 7.3
refs #4013
2020-01-13 13:17:40 +01:00
Johannes Meyer 5a58279995 ActionController: Don't render exceptions as PDF 2020-01-10 14:11:52 +01:00
Johannes Meyer 5943e6bde9 Pdf: Restore previous state after rendering content
In case an exception occurs its output was previously merged
with the rendered content or even PDF..
2020-01-10 14:11:40 +01:00
Johannes Meyer f63dfa5294 DbUserBackend: Use binary string comparison if it's a mysql db 2019-12-11 10:15:05 +01:00
Johannes Meyer e6d9819adb FilterQueryString: Parse numbers as floats in range conditions 2019-12-09 09:39:50 +01:00
Johannes Meyer dc8981f209 ConfigFormEventsHook: Use base class `Icinga\Web\Form` in type hints 2019-12-09 09:01:33 +01:00
Johannes Meyer 4157821c89 IcingaCheckbox: Don't `display:none` the checkbox but add `.sr-only` to it 2019-12-05 16:12:41 +01:00
Johannes Meyer 668ae38497 ExternalBackend: Don't authenticate a user if `REMOTE_USER` is empty 2019-12-05 15:13:02 +01:00
Johannes Meyer d0857345d0 DbConnection: Set `COLLATE 'latin1_general_ci'` for `latin1` charsets
MySQL 8+ seems a bit more strict now.
2019-12-05 14:18:17 +01:00
Johannes Meyer 8519bb5d11 User: Don't return true if any permission is granted and `*` is required 2019-12-05 08:44:33 +01:00
Johannes Meyer 7b488d7f93 swag: Fix violations of PSR-12
PSR-2 has been deprecated and phpcs v3.5.3
now checks for the successor PSR-12
2019-12-04 11:28:08 +01:00
Johannes Meyer 9c94b9cde7 vendor/lessphp: Check for an array before accessing an offset
https://www.php.net/manual/en/migration74.incompatible.php#migration74.incompatible.core.non-array-access
2019-12-04 11:28:08 +01:00
Johannes Meyer 369ffa758e zend/Registry: Don't override method `offsetExists()`
It's not possible to use `array_key_exists()` on objects anymore
(https://www.php.net/manual/en/migration74.deprecated.php#migration74.deprecated.core.array-key-exists-objects)
and since the referenced bug (http://bugs.php.net/bug.php?id=40442)
only applied to PHP 5.2.0 it's now obsolete.
2019-12-04 11:28:08 +01:00
Johannes Meyer d34909bbac vendor/lessphp: Avoid curly braces to access array offsets
https://www.php.net/manual/en/migration74.deprecated.php#migration74.deprecated.core.array-string-access-curly-brace
2019-12-04 11:28:08 +01:00
Johannes Meyer 0a44bbc804 vendor/Zend: Avoid curly braces to access array offsets
https://www.php.net/manual/en/migration74.deprecated.php#migration74.deprecated.core.array-string-access-curly-brace
2019-12-04 11:28:08 +01:00
Johannes Meyer 67dd439673 vendor/HTMLPurifier: Avoid curly braces to access array offsets
https://www.php.net/manual/en/migration74.deprecated.php#migration74.deprecated.core.array-string-access-curly-brace
2019-12-04 11:28:08 +01:00
Johannes Meyer 0442c4f0ab View: Ignore setting `short_open_tag`
Adjusting class `Zend_View_Stream` according to https://www.php.net/manual/en/migration74.incompatible.php#migration74.incompatible.core.stream-wrappers
didn't work. (*syntax error, unexpected end of file* after every last php statement in phtml files)

So.. since `<?= ?>` instructions are permanently available since PHP 5.4 (https://www.php.net/manual/en/language.basic-syntax.phptags.php)
we'll just omit using a custom stream wrapper now.
2019-12-04 09:35:24 +01:00