{"action":"created","issue":{"url":"https://api.github.com/repos/MISP/MISP/issues/1402","repository_url":"https://api.github.com/repos/MISP/MISP","labels_url":"https://api.github.com/repos/MISP/MISP/issues/1402/labels{/name}","comments_url":"https://api.github.com/repos/MISP/MISP/issues/1402/comments","events_url":"https://api.github.com/repos/MISP/MISP/issues/1402/events","html_url":"https://github.com/MISP/MISP/issues/1402","id":169108756,"number":1402,"title":"Log message in MISP Logs for MethodNotAllowedException","user":{"login":"elhoim","id":178521,"avatar_url":"https://avatars1.githubusercontent.com/u/178521?v=4","gravatar_id":"","url":"https://api.github.com/users/elhoim","html_url":"https://github.com/elhoim","followers_url":"https://api.github.com/users/elhoim/followers","following_url":"https://api.github.com/users/elhoim/following{/other_user}","gists_url":"https://api.github.com/users/elhoim/gists{/gist_id}","starred_url":"https://api.github.com/users/elhoim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elhoim/subscriptions","organizations_url":"https://api.github.com/users/elhoim/orgs","repos_url":"https://api.github.com/users/elhoim/repos","events_url":"https://api.github.com/users/elhoim/events{/privacy}","received_events_url":"https://api.github.com/users/elhoim/received_events","type":"User","site_admin":false},"labels":[{"id":27676211,"url":"https://api.github.com/repos/MISP/MISP/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":220360749,"url":"https://api.github.com/repos/MISP/MISP/labels/logging","name":"logging","color":"444444","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-03T11:23:57Z","updated_at":"2018-05-23T19:35:22Z","closed_at":null,"author_association":"MEMBER","body":"Log a meaningful error message, preferably with username and/or source ip inside MISP logs just before MethodNotAllowedException exceptions are thrown.\n\nWhat I have now is lots of errors logged into error.log but not means of knowing what is creating them. \n\nFor example:\n\n```\n2016-08-03 11:15:11 Error: [MethodNotAllowedException] You do not have permission to use this functionality.\nRequest URL: /shadow_attributes/getProposalsByUuid/5703b3c1-e6a4-421a-a394-440f950d210f\nStack Trace:\n#0 /var/www/MISP/app/Controller/Component/ACLComponent.php(376): ACLComponent->__error(403, 'You do not have...')\n#1 /var/www/MISP/app/Controller/AppController.php(334): ACLComponent->checkAccess(Array, 'shadowAttribute...', 'getProposalsByU...')\n#2 /var/www/MISP/app/Controller/ShadowAttributesController.php(25): AppController->beforeFilter()\n#3 [internal function]: ShadowAttributesController->beforeFilter(Object(CakeEvent))\n#4 /var/www/MISP/app/Lib/cakephp/lib/Cake/Event/CakeEventManager.php(243): call_user_func(Array, Object(CakeEvent))\n#5 /var/www/MISP/app/Lib/cakephp/lib/Cake/Controller/Controller.php(676): CakeEventManager->dispatch(Object(CakeEvent))\n#6 /var/www/MISP/app/Lib/cakephp/lib/Cake/Routing/Dispatcher.php(189): Controller->startupProcess()\n#7 /var/www/MISP/app/Lib/cakephp/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke(Object(ShadowAttributesController), Object(CakeRequest))\n#8 /var/www/MISP/app/webroot/index.php(92): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))\n#9 {main}\n```\n"},"comment":{"url":"https://api.github.com/repos/MISP/MISP/issues/comments/391470295","html_url":"https://github.com/MISP/MISP/issues/1402#issuecomment-391470295","issue_url":"https://api.github.com/repos/MISP/MISP/issues/1402","id":391470295,"user":{"login":"iglocska","id":3668672,"avatar_url":"https://avatars0.githubusercontent.com/u/3668672?v=4","gravatar_id":"","url":"https://api.github.com/users/iglocska","html_url":"https://github.com/iglocska","followers_url":"https://api.github.com/users/iglocska/followers","following_url":"https://api.github.com/users/iglocska/following{/other_user}","gists_url":"https://api.github.com/users/iglocska/gists{/gist_id}","starred_url":"https://api.github.com/users/iglocska/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iglocska/subscriptions","organizations_url":"https://api.github.com/users/iglocska/orgs","repos_url":"https://api.github.com/users/iglocska/repos","events_url":"https://api.github.com/users/iglocska/events{/privacy}","received_events_url":"https://api.github.com/users/iglocska/received_events","type":"User","site_admin":false},"created_at":"2018-05-23T19:35:22Z","updated_at":"2018-05-23T19:35:22Z","author_association":"MEMBER","body":"yep!"}}
{"actor":{"display_login":"iglocska"}}