2282 Commits

Author SHA1 Message Date
Johannes Meyer
666591beb7 Encode url before passing it to Icinga\Form\Dashboard\AddUrlForm
fixes #6611
2014-08-13 16:41:40 +02:00
Johannes Meyer
7311ab964e Do not set the full url from the request as action with form parameters
Setting an url with parameters named like form elements in a form with
method POST causes Zend to ignore any POST data because GET will be
processed with higher priority.

fixes #6806
2014-08-13 14:50:21 +02:00
Johannes Meyer
e7da9c0a00 Make our anti CSRF logic being a form element
refs #5525
2014-08-12 14:43:10 +02:00
Johannes Meyer
fe63ce664f Make use if 'ignore´ instead of explicitly unsetting array keys
refs #5525
2014-08-12 13:57:28 +02:00
Johannes Meyer
4b1169c0a1 Fix improper form submission
refs #5525
2014-08-12 10:41:19 +02:00
Thomas Gelf
8f729bfb65 ActionController: set a default window title
In case a controller action didn't set a view title this fix restores
the default title on XHR requests.

fixes #6797
2014-07-31 17:04:26 +02:00
Marius Hein
56a29354d3 AutoLogin: Check the remote username against logged in user
fixes #6462
2014-07-30 12:54:08 +02:00
Marius Hein
e2c761a7aa AutoLogin/Logout: Remove own session namespace
Store data in the user and implement interface to left
backends store remote information.

fixes #6461
2014-07-30 12:35:55 +02:00
Eric Lippmann
294728ac47 Revert "Autologin: Test logged session against remote user"
This reverts commit 64954e99244f26cc6b6dccc7d60a253c105bd550.

If the strip_username_regex is configured on the autologin backend and applies on a user's name,
the authenticated user's username does never match the REMOTE_USER server variable.
Thus the application will logout/login on every request which results in a redirect loop.

refs #6462
2014-07-29 17:50:44 +02:00
Marius Hein
64954e9924 Autologin: Test logged session against remote user
fixes #6462
2014-07-29 12:06:43 +02:00
Marius Hein
8b9d446d2e Autologin: Remove deprecated autologin methods
Remove methods from manager because autologin
is now handled with special backends (AutoLoginBackend).

The session is used to store the status about a remote
user authentication to send a 401 header to the client
upon logout.

refs #6461
2014-07-29 10:48:57 +02:00
Eric Lippmann
edc89d6ad6 lib: Remove `NodeRenderer'
`NodeRenderer' is superseded by `TocRenderer'.
2014-07-28 19:12:35 +02:00
Eric Lippmann
e26d360561 lib/Node: Remove method `findNodeBy()'
The new `DocTree' class provides `getNode()'.
2014-07-28 19:07:13 +02:00
Eric Lippmann
bbcdcb4609 lib: Add `Identifiable' interface for objects that are identifiable by an ID of any type 2014-07-28 19:05:37 +02:00
Johannes Meyer
c3731fa79e Adjust removeresource-action to suit the new resource form interface
refs #5525
2014-07-24 16:17:30 +02:00
Eric Lippmann
a68ccecb28 Revert "Do not use htmlspecialchars in widgets"
This reverts commit 2ff43abcf5860f4002d4fbb2aee930b22ab93ea6.

`Widget::escape()' does not exist. But `Widget::view()::espcae()' does.
2014-07-23 12:28:04 +02:00
Alexander Klimov
2ff43abcf5 Do not use htmlspecialchars in widgets
refs #6759
2014-07-23 12:12:05 +02:00
Johannes Meyer
8b2cc3a558 Do not consider <button type=submit> when checking form completion
refs #5525
2014-07-23 10:58:45 +02:00
Johannes Meyer
0bf0213547 Rename Form::addElement to Form::createElement
Since we are using mainly createElement and addElement is only an alias for
createElement if no object is passed our changes to addElement can safely
be moved to createElement.

refs #5525
2014-07-23 10:57:46 +02:00
Johannes Meyer
25c9ee567d Add missing use statement for Zend_View_Abstract 2014-07-23 10:54:22 +02:00
Eric Lippmann
e005333806 Merge branch 'master' into feature/display-documentation-4820 2014-07-22 12:25:58 +02:00
Matthias Jentsch
0eaaaf2f29 Make bar charts thicker 2014-07-22 11:32:52 +02:00
Matthias Jentsch
4b8bb99fa1 Fix svg text rotation in firefox
Use the SVG transform attribute instead of the writing-mode attribute to support firefox.
2014-07-22 11:26:35 +02:00
Matthias Jentsch
0a500efd8a Determine the max value in LinearUnit dynamically
The range between min and max should always be divisable by the amount of
ticks, to ensure that the vertical lines are always at a full discrete value.

fixes #6769
2014-07-21 17:21:54 +02:00
Johannes Meyer
75e09f2c69 Do not consider submit buttons when checking form completion
refs #5525
2014-07-21 15:25:00 +02:00
Alexander Klimov
cebd71b2ff Fix "Fatal error: Interface 'Icinga\Data\DatasourceInterface' not found in Icinga\Protocol\File\Reader"
fixes #6722
2014-07-21 14:14:13 +02:00
Alexander Klimov
c5ecbf250d lib: add FileReaderException for file reader specific errors
refs #6722
2014-07-21 14:11:08 +02:00
Alexander Klimov
6df7be7ee5 File/Query: Fix applyFilter' and order' not matching SimpleQuery's interfaces
refs #6722
2014-07-21 14:09:40 +02:00
Matthias Jentsch
091ddbe552 Partiall revert bfc54b7e
Refactor Url->getParams() to return an instance of UrlParam instead of an array.

fixes #6760
2014-07-21 09:22:19 +02:00
Johannes Meyer
f5ac592645 Do not consider disabled elements when checking form completion
Values of disabled inputs are not sent by browsers.

refs #5525
2014-07-21 08:57:41 +02:00
Alexander Klimov
5ea02b41ea Optimize variable names and positions, cast array direct to object 2014-07-18 17:35:24 +02:00
Thomas Gelf
2a204897b4 DbQuery: improve method description
Not English mine this was, copy paste did I ;)
2014-07-18 16:48:52 +02:00
Thomas Gelf
209894d857 DbQuery: add dummy isTimestamp function
Not the best solution, but helps for now.

fixes #6675
2014-07-18 16:35:29 +02:00
Johannes Meyer
f4ff2c90f2 It's a form's responsibility how its submit button should look like
refs #5525
2014-07-18 09:54:36 +02:00
Johannes Meyer
6ac471c598 Also mention the viewscript functionality of Form::loadDefaultDecorators()
refs #5525
2014-07-18 09:52:50 +02:00
Johannes Meyer
8f0b9899a3 We cannot know what kind of data is passed to Form::isValid()
refs #5525
2014-07-18 09:52:05 +02:00
Johannes Meyer
78a6175acc Make form creation lazy and implement the new validation mechanism
Form creation must not depend on specific function calls. If a forms' elements are required and missing, create them. Form::isValid() must be
able to determine whether a form can be processed or not without to rely
on a particular button value.

refs #5525
2014-07-18 09:51:15 +02:00
Johannes Meyer
37fd3deb67 Rename initCsrfToken to addCsrfToken and move it upwards
Form::addCsrfToken() should be public and fluent to ensure more
flexibility.

refs #5525
2014-07-18 09:43:03 +02:00
Johannes Meyer
58188c5cc1 We only want to rely on Form::isValid() when about to process forms
As the new auto-submission implementation does not depend on whether
a submit button was pressed or not we need another way to determine
whether a form should be processed.

refs #5525
2014-07-18 09:33:09 +02:00
Johannes Meyer
802c095bf8 Configuration values need to be inserted to forms explicitly
It's the controllers' responsibility to ensure that forms are populated with
configuration values on GET requests.

refs #5525
2014-07-18 09:27:10 +02:00
Johannes Meyer
21cd503ee7 Form buttons need to be added explicitly
We either demand the user to add a submit button or provide a implicit
function call to be implemented by him, adding additional elements once
the form gets rendered.

refs #5525
2014-07-18 09:24:49 +02:00
Johannes Meyer
47ae4d79dc Forms do not need a special title property
As our upcoming wizard has no menu and our tabs are hardcoded we do not
need a special "title" property anymore.

refs #5525
2014-07-18 09:21:11 +02:00
Johannes Meyer
1de2d0c14f Merge branch 'master' into bugfix/rebuild-form-builder-5525
Conflicts:
	application/forms/Authentication/LoginForm.php
	library/Icinga/Test/BaseTestCase.php
	library/Icinga/Web/Form.php
	library/Icinga/Web/Form/Decorator/BootstrapForm.php
2014-07-17 13:15:42 +02:00
Matthias Jentsch
bfc54b7e32 Fix array conversion of the Dashboard and its Components
Do not omit the parameters when converting the dashboard components to
an array. Add an array conversion to the UrlParams class.

refs #6691
2014-07-16 17:31:01 +02:00
Johannes Meyer
5c507d5d91 Fix notice that the session has been already started after retrieving its id 2014-07-16 15:39:40 +02:00
Johannes Meyer
eb977b7a55 Fix wrong variable assignment causing preferred languages not being set 2014-07-16 15:17:14 +02:00
Johannes Meyer
e5fdf78c98 Fix testing errors due to accessing the session id by using our container 2014-07-16 10:18:00 +02:00
Johannes Meyer
e6dee9fe89 Protect login against CSRF
refs #5626
2014-07-16 09:55:23 +02:00
Johannes Meyer
b40027b6c7 Purge session when logging out
fixes #6739
2014-07-16 09:55:22 +02:00
Johannes Meyer
19f05256a0 Only call session_start() when reading from session
fixes #6383
2014-07-16 09:55:22 +02:00