Commit Graph

2540 Commits

Author SHA1 Message Date
Matthias Jentsch aa3cc9847d Fix issue that bricked the dashboard when quotes in dashlets
Escape more special chars in IniWriter, support reading escaped readers in IniParser and add tests for all important escape cases.
2015-08-07 12:55:19 +02:00
Matthias Jentsch 308c8ccf79 Fix issue that caused exceptions when using sections with trailing or leading whitespaces
Trim all incoming section identifier to prevent ambiguities between parsd sections and input sections.
2015-08-07 09:26:50 +02:00
Matthias Jentsch eebd8be746 Prevent configuration changes that would break PHP lib ini parser 2015-08-06 17:39:46 +02:00
Matthias Jentsch 9b373e9d10 Fix issue that caused IniWriter to fail on empty configs 2015-08-06 17:21:52 +02:00
Johannes Meyer c7cc9e66df JavaScript: Load all available module javascript files
refs #9702
2015-08-06 15:15:02 +02:00
Johannes Meyer 9cea83242c StyleSheet: Load all available module stylesheets
refs #9702
2015-08-06 15:14:29 +02:00
Johannes Meyer 712d545f48 Module: Allow to define additional Javascript files
refs #9702
2015-08-06 15:10:54 +02:00
Johannes Meyer 51aa22d429 Module: Allow to define additional CSS/LESS files
refs #9702
2015-08-06 15:10:33 +02:00
Johannes Meyer 59ef54314a Extend the Web bootstrapper from the EmbeddedWeb bootstrapper
In a embedded web environment we may also need a request and response.

refs #9702
2015-08-06 15:08:41 +02:00
Johannes Meyer 0695d5900c Merge branch 'master' into feature/less-costly-count-queries-for-history-views-8615 2015-08-06 13:11:28 +02:00
Eric Lippmann 528382098e db: Respect group by for count queries, really
Missed that Johannes introduced DbQuery::getGroup().

refs #9828
2015-08-06 10:46:40 +02:00
Johannes Meyer 7662545c2a SimpleQuery: Provide a getter for the current iterator position
refs #8615
2015-08-06 09:39:23 +02:00
Matthias Jentsch 60675979bc Merge branch 'bugfix/creating-dashlet-with-parentheses-9530'
fixes #9530
2015-08-05 18:22:29 +02:00
Matthias Jentsch f8e2dc850c Drop IniEditor and clean up IniWriter
Replace the ini editor code with a new parser implementation that manipulates a DOM. Do not support capabillities that are no longer needed, like nested configurations, section inheritance, section-less properties.
2015-08-05 18:10:17 +02:00
Johannes Meyer a0d5509f19 DbQuery: Drop attribute $maxCount
It's not used anywhere and completely useless the way it's implemented.
2015-08-05 10:54:14 +02:00
Eric Lippmann 064e821383 lib: Fix wrong count for queries having a group by clause
fixes #9828
2015-08-04 16:25:34 +02:00
Matthias Jentsch 28e1b3119c Remove unused "extends"-code 2015-08-04 15:14:10 +02:00
Alexander Fuhr c3fe14a205 Modules/Manager: Fix that non-existent modules can be disabled
fixes #9374
2015-08-04 14:34:30 +02:00
Matthias Jentsch 7095ad5bc7 Improve ini editor and dashlet input validation 2015-08-04 13:23:30 +02:00
Matthias Jentsch d88c628b6b Escape section names before applying regex
refs #9530
2015-08-04 13:14:46 +02:00
Johannes Meyer d1917ad2b4 Merge branch 'master' into bugfix/do-not-use-count-queries-for-emptiness-checks-9632
Conflicts:
	modules/monitoring/application/views/scripts/service/history.phtml
2015-08-03 16:46:27 +02:00
Eric Lippmann 688a08585b Merge branch 'master' into bugfix/error-prone-generictts-9611
Conflicts:
	modules/monitoring/application/views/scripts/show/components/downtime.phtml
2015-08-03 15:05:45 +02:00
Johannes Meyer 9a0e47a3e1 SimpleQuery: Add method hasResult()
refs #9632
2015-08-03 14:49:33 +02:00
Johannes Meyer dbc2f98053 SimpleQuery: Initialize self::$iteratorPosition as late as possible
refs #9632
2015-08-03 14:09:55 +02:00
Eric Lippmann ea5db51213 Fix "Try to get an inexistent pane." when clicking on the "Search" tab 2015-08-03 13:01:11 +02:00
Eric Lippmann 139baffdc6 lib: Make Dashboard::$tabs protected
The SearchDashboard has to override Dashboard::getTabs() in order to set up the correct tab.
2015-08-03 13:01:11 +02:00
Eric Lippmann 177fafaa56 lib: Fix TicketHook's PHPDoc
refs #9611
2015-08-03 11:05:48 +02:00
Eric Lippmann 451be1e97f monitoring/hooks: Add TicketHook::createLinks()
Instead of calling preg_replace_callback w/o error handling in our view scripts, TicketHook::createLinks() will take care of that.

refs #9611
2015-07-31 15:31:41 +02:00
Johannes Meyer 99c69cc461 SimpleQuery: Add support for peek aheads
refs #9661
2015-07-31 13:51:39 +02:00
Johannes Meyer fe41d312ca RepositoryQuery: Do not bypass the query's own iterator
refs #9661
2015-07-31 13:12:41 +02:00
Johannes Meyer 16e54d3987 DbQuery: Be less error-prone while calling array_search 2015-07-31 11:05:23 +02:00
Johannes Meyer 6c105b867e Form: Be less error-prone while calling array_search 2015-07-31 11:05:09 +02:00
Johannes Meyer 5345831742 SessionNamespace: Be less error-prone while calling array_search 2015-07-31 11:04:51 +02:00
Johannes Meyer 449a19c3a3 Session: Be less error-prone while calling array_search 2015-07-31 11:04:43 +02:00
Johannes Meyer 24cb123f47 Tabs: Be less error-prone while calling array_search 2015-07-31 11:04:36 +02:00
Johannes Meyer 316a4d8b82 Merge branch 'master' into bugfix/allow-to-configure-how-to-manage-groups-9609 2015-07-30 16:16:04 +02:00
Eric Lippmann a234852f32 Merge branch 'feature/basic-auth-9660'
resolves #9660
2015-07-30 15:05:07 +02:00
Eric Lippmann feed927fd2 Let external auth win over session auth and session auth over http auth
refs #9660
2015-07-30 14:50:05 +02:00
Eric Lippmann 9060e8a034 lib: Only call Icinga::app()->getRequest() for getting the request outside of a controller
Saves a call to getFrontController().

refs #9660
2015-07-30 14:02:44 +02:00
Eric Lippmann 55ad2dd65f Don't fail if password contains a colon on basic auth
refs #9660
2015-07-30 13:59:47 +02:00
Eric Lippmann c594d6db33 Challenge client on invalid basic access auth credentials
refs #9660
2015-07-30 13:59:18 +02:00
Eric Lippmann 42d698a6b3 lib: Add Web::getResponse()
Use this method for retrieving the response object outside a controller.

refs #9660
2015-07-30 13:47:54 +02:00
Eric Lippmann 81aad9d6a6 Rename Notifiation::getMessages() to popMessages()
Because the call to popMessages()--before getMessages()--automatically resets the notification messages on the instance, popMessages() is a much better name for the method.

refs #9660
2015-07-30 13:45:39 +02:00
Eric Lippmann d545e1f7d1 lib: Don't write the empty notifications array into the session
I combined this w/ introducing some constants for notification types and PHPDoc.

refs #9660
2015-07-30 13:42:59 +02:00
Eric Lippmann 9aa1599a18 Form: Disable CSRF counter measure only on API requests
refs #9660
2015-07-30 12:04:22 +02:00
Eric Lippmann c23c7a5fa9 lib: Add Request::getIsApiRequest()
If the Accept header is set to application/json it's an API request.

refs #9660
2015-07-30 12:03:33 +02:00
Eric Lippmann 3aae37aff3 Don't redirect on external auth
refs #9660
2015-07-30 12:02:42 +02:00
Eric Lippmann db505281ee lib: Disable CSRF token on HTTP authenticated users and not XHR
refs #9660
2015-07-30 09:33:04 +02:00
Eric Lippmann 36ff2d8914 lib: Set User::$isHttpUser in Auth
refs #9660
2015-07-30 09:32:24 +02:00
Eric Lippmann 775f8cced6 lib: Introduce User::$isHttpUser
refs #9660
2015-07-30 09:31:58 +02:00