Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev.icinga.com #6281] ShowController's hostAction() and serviceAction() do not respond with 400 for invalid/missing parameters and with 404 if the host or service wasn't found #685

Closed
icinga-migration opened this issue May 23, 2014 · 12 comments
Labels
area/monitoring Affects the monitoring module bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/6281

Created by elippmann on 2014-05-23 10:52:51 +00:00

Assignee: elippmann
Status: Resolved (closed on 2015-05-22 07:30:03 +00:00)
Target Version: 2.0.0-rc1
Last Update: 2015-05-22 07:30:03 +00:00 (in Redmine)


tgelf wrote:

Invalid hosts or unsufficient permissions should IMO trigger 404. Before sending 404 with a nice message we could also first check whether Icinga is currently reloading and show additional information if so.

Changesets

2015-05-06 12:21:46 +00:00 by afuhr 6df031d

Add proper respond http codes to service and host controller

fixes #6281

2015-05-21 14:14:02 +00:00 by elippmann ce9110d

Revert "Add proper respond http codes to service and host controller"

This reverts commit 6df031dc786256e0bd42f8047d6c308e90abedf6.

I revert this commit for the following reasons:
- MissingParameterException must not be thrown manually because we have UrlParams::getRequired() which was UrlParams::req() before.
- The commit introduces the untranslated string 'host or service'.
- 4xx are client, not server errors.
- Copy and paste code for the stack trace handling in the ErrorController.

refs #6281

2015-05-21 14:18:09 +00:00 by elippmann e8c704b

monitoring: Fix HTTP response code when showing an invalid service

refs #6281

2015-05-21 14:18:09 +00:00 by elippmann 0b81a11

monitoring: Fix HTTP response code when showing an invalid host

refs #6281

2015-05-21 14:43:58 +00:00 by elippmann c4ed49c

lib: Add HttpNotFoundException

The HttpNotFoundException should be used for sending a HTTP 404 response w/ a custom message.

There's also Zend_Controller_Action_Exception but this exception will always show 'Page not found' because we
want to hide messages generated by Zend, like 'Action "foobar" does not exist and was not trapped in __call()'.

refs #6281

2015-05-21 14:54:00 +00:00 by elippmann dd10251

Throw HttpNotFoundException on Controller::httpNotFound()

refs #6281

2015-05-21 14:56:27 +00:00 by elippmann 03b4de3

Handle the HttpNotFoundException in the ErrorController

refs #6281

2015-05-21 14:57:43 +00:00 by elippmann 5e520e7

Don't display a error message as title too

refs #6281

2015-05-21 15:17:25 +00:00 by elippmann 8f42d7a

monitoring: Fix HTTP response code when showing an invalid downtime

refs #6281

2015-05-21 15:18:29 +00:00 by elippmann fcd7aae

lib: Add HttpException as base class for HTTP exceptions

refs #6281

2015-05-21 15:19:07 +00:00 by elippmann fde60f4

lib: Add HttpMethodNotAllowedException

At the moment we throw a Zend_Controller_Action_Exception when the HTTP method is not allowed.
I'll replace this w/ the exception introduced.

refs #6281

2015-05-22 07:12:42 +00:00 by elippmann 71a2324

lib: Let Controller::assertHttpMethod() throw a HttpMethodNotAllowedException

refs #6281

2015-05-22 07:15:52 +00:00 by elippmann 3f608fd

Handle the HttpMethodNotAllowedException in the ErrorController

refs #6281

2015-05-22 07:20:27 +00:00 by elippmann e137263

monitoring: Fix HTTP response code when showing an invalid comment

refs #6281

2015-05-22 07:25:49 +00:00 by elippmann d2bb74a

lib: Move HttpNotFoundException beneath the Http Exception namespace

refs #6281

2015-05-22 07:27:51 +00:00 by elippmann 2bdb725

Merge branch 'bugfix/monitoring-controllers-response-codes-6281'

fixes #6281

Relations:

@icinga-migration
Copy link
Author

Updated by tgelf on 2014-05-26 11:55:28 +00:00

  • Status changed from New to Assigned

We have to thank ::fromRequest for this "feature" ;) It gives you "nice" effects when switching backend in your config file while an object is shown, especially when you have zillions of comments in your DB :p That way we also lost the possibility to enforce restrictions.

I guess I can easily fix this when switching to the new filters. Invalid hosts or unsufficient permissions should IMO trigger 404. Before sending 404 with a nice message we could also first check whether Icinga is currently reloading and show additional information if so.

Best,
Thomas

@icinga-migration
Copy link
Author

Updated by jmeyer on 2014-08-14 11:44:35 +00:00

  • Relates set to 6469

@icinga-migration
Copy link
Author

Updated by jmeyer on 2014-08-14 11:48:20 +00:00

  • Subject changed from ShowController's hostAction() and serviceAction() do not require a parameter to ShowController's hostAction() and serviceAction() do not respond with 404 for invalid/missing parameters
  • Description updated
  • Category set to 140
  • Status changed from Assigned to New

@icinga-migration
Copy link
Author

Updated by elippmann on 2014-10-28 09:33:01 +00:00

  • Category changed from 140 to Framework
  • Target Version set to 2.0-16

@icinga-migration
Copy link
Author

Updated by elippmann on 2014-11-21 15:39:05 +00:00

  • Target Version changed from 2.0-16 to Backlog

@icinga-migration
Copy link
Author

Updated by elippmann on 2015-03-30 08:29:03 +00:00

  • Subject changed from ShowController's hostAction() and serviceAction() do not respond with 404 for invalid/missing parameters to ShowController's hostAction() and serviceAction() do not respond with 400 for invalid/missing parameters and with 404 if the host or service wasn't found
  • Category changed from Framework to Monitoring
  • Target Version changed from Backlog to 2.0.0-rc1

@icinga-migration
Copy link
Author

Updated by elippmann on 2015-03-30 14:55:53 +00:00

  • Relates set to 8700

@icinga-migration
Copy link
Author

Updated by jmeyer on 2015-05-04 10:09:22 +00:00

  • Assigned to set to afuhr

@icinga-migration
Copy link
Author

Updated by afuhr on 2015-05-06 12:27:25 +00:00

  • Status changed from New to Resolved
  • Done % changed from 0 to 100

Applied in changeset 6df031d.

@icinga-migration
Copy link
Author

Updated by elippmann on 2015-05-21 14:58:35 +00:00

  • Status changed from Resolved to Assigned
  • Assigned to changed from afuhr to elippmann

@icinga-migration
Copy link
Author

Updated by icinga-kanban on 2015-05-22 07:22:36 +00:00

Build !#677 triggered by commit e137263 passed successfully.

Branch: origin/bugfix/monitoring-controllers-response-codes-6281
Author: Eric Lippmann

@icinga-migration
Copy link
Author

Updated by elippmann on 2015-05-22 07:30:03 +00:00

  • Status changed from Assigned to Resolved

Applied in changeset 2bdb725.

@icinga-migration icinga-migration added bug Something isn't working area/monitoring Affects the monitoring module labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.0.0-rc1 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/monitoring Affects the monitoring module bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant