Commit Graph

198 Commits (4fea371c4b417e6eac5cdefe0baf77840f5752a1)

Author SHA1 Message Date
William Robinet 4fea371c4b Fix permissions 2016-02-11 17:03:51 +01:00
Iglocska be62a6b053 Entering a valid controller/action and an invalid one produced a different result pre-auth
- not authenticated users now automatically get redirected to the login page, no matter what action they requested
- This as a nice side effect also removed the bug that was caused by a site admin looking at an admin function before logging out / timing out and being incorrectly redirected to /admin/users/login
2016-01-21 14:52:06 +01:00
Iglocska 24c2073f69 Fix to a trailing slash in the baseurl breaking the upgrade script 2016-01-07 16:38:23 +01:00
iglocska 627f9abbd6 Fix to several issues with the sync and and an issue preventing the editing of events, fixes #788, fixes #784 2015-12-24 15:22:05 +01:00
Iglocska cc2e4171cf Don't run the anti IE 8 check on requests that don't have a user agent set, fixes #775 2015-12-19 19:41:17 +01:00
Iglocska 5ed1c27e43 Disable users
- users can now be disabled by an admin
- disabled users cannot login (via the UI or the API) and will be informed
- login attempts by disabled users are logged

- also added the expiration field for later use
2015-12-09 23:47:19 +01:00
Iglocska af92e29e3c Further progress on the sync
- also, added maintenance mode
- various fixes
2015-12-09 01:43:54 +01:00
Iglocska ab26eafd63 Added the possibility to enable debug for site admins
- new option in server settings
- enable debug (equal to normal debug level 1) for site admins only

- regular users will be unaffected
2015-12-03 01:45:38 +01:00
iglocska 485c007b39 Merge branch 'master' into 2.4-beta
Conflicts:
	VERSION.json
	app/Lib/Tools/XMLConverterTool.php
	app/Model/Event.php
	app/Model/EventTag.php
	app/Model/TemplateElementAttribute.php
	app/Model/TemplateElementFile.php
	app/Model/TemplateElementText.php
	app/Model/ThreatLevel.php
	app/View/Attributes/index.ctp
	app/View/Elements/eventattribute.ctp
	app/View/Elements/eventattributerow.ctp
	app/View/Elements/global_menu.ctp
	app/View/Elements/side_menu.ctp
	app/View/Events/automation.ctp
	app/View/Events/index.ctp
	app/View/Pages/administration.ctp
	app/View/ShadowAttributes/index.ctp
	app/View/Tags/index.ctp
2015-11-17 01:14:51 +01:00
iglocska b3a2428345 Merge branch 'basedir' into hotfix-2.3.160
Conflicts:
	app/Controller/AppController.php
	app/View/Pages/administration.ctp
2015-11-17 00:33:34 +01:00
iglocska 3045cc2630 Fixed an invalid detection of JSON requests when not passing the accept header
- some json actions worked by passing the .json extension in the url
- these pages were correctly returning JSONs but were often internally running through the HTML code-path thanks to an invalid detection
- the new correct detection should provide a major speed boost for certain json requests
2015-11-16 00:25:21 +01:00
iglocska 487912a15a Fix to an invalid json request detection leading to the JSON export failing
- It seems like relying on the Accept header can lead to the data type detection failing when accessing .json extension views
- this issue seems to have gone unnoticed since until now the data passed to the json view was the same as that passed to the html view
- this means that all the additional UI only features may have triggered in the background previously on .json views
2015-11-15 17:43:19 +01:00
iglocska f36e00e944 Permission checks 2015-11-14 17:27:06 +01:00
iglocska 8cc0996c3c Merge branch 'master' into 2.4-beta
Conflicts:
	VERSION.json
	app/View/Elements/side_menu.ctp
	app/View/Pages/administration.ctp
2015-11-14 17:16:38 +01:00
iglocska afdcc1af0c Fixed a security issue with the CSRF protection being avoidable using some site admin functionality
- as discovered and reported by Egidio Romano of Minded Security

- Lacking checks of HTTP methods in some functionality could lead to a site admin uploading and executing malicious scripts

- Tightened HTTP method verification across the board for actions that modify data
- Turned some administrative tasks to POST only actions
2015-11-13 23:57:03 +01:00
pugilist e7e76bfc44 patched termsaccepted and change_pw checks to redirect properly when a base directory is specified. 2015-11-09 09:22:24 -05:00
iglocska 9faf3df8ae Some fixes to the api authentication
- Handle user not found gracefully
- Log the failed authentication correctly
2015-11-09 08:52:06 +01:00
iglocska 324418dcf9 Merge branch 'master' into 2.4-beta
Merge and upgrade of several new features

Conflicts:
	VERSION.json
	app/Controller/ShadowAttributesController.php
	app/Controller/TagsController.php
	app/Model/AppModel.php
	app/Model/Event.php
	app/Plugin/SysLogLogable/Model/Behavior/SysLogLogableBehavior.php
2015-11-08 23:26:19 +01:00
iglocska 16e7974fc0 Improved logging, fixes #695
- Added logging of failed login attempts
- Added (optional) logging of successful authentications
  - admin setting that has to be enabled
  - will log all API calls (both HTTP method and target url)

- optional logging of user IP address for all logs
  - each log entry created while this setting is enabled will log the IP address of the client
  - disabling it also hides the IPs from the interface
  - added new IP field for the log search (only if enabled)
2015-11-08 22:35:46 +01:00
pugilist e451945b11 modified beforefilter to allow to be accessed by all views 2015-11-08 13:21:16 -05:00
Iglocska 38d8bd0a77 Moved remaining UUID generation calls to the new uuid wrapper 2015-10-15 15:01:51 +02:00
Iglocska eeb1d8d117 Fixes to bugs with org usage from 2.3 2015-10-15 11:11:05 +02:00
Iglocska 888042dbd6 Added the first version of the correlation graphing
Conflicts:
	VERSION.json
2015-10-14 03:45:34 +02:00
Iglocska 328c666e3a Merge branch 'master' into feature/sg
Merging all the new changes from master

Conflicts:
	VERSION.json
	app/Console/Command/AdminShell.php
	app/Controller/AttributesController.php
	app/Controller/EventsController.php
	app/Model/Attribute.php
	app/Model/Event.php
	app/Model/Log.php
	app/Model/Server.php
	app/Model/User.php
	app/View/Elements/side_menu.ctp
	app/View/Pages/administration.ctp
	app/View/Users/admin_index.ctp
2015-10-12 09:41:20 +02:00
iglocska cfec8d65e4 Fix to an issue introduced in 2.3.128 that incorrectly causes MISP to not sync due to a version mismatch 2015-09-17 11:28:57 +02:00
iglocska 26e640e19c Further progress on several issues 2015-09-16 12:15:43 +02:00
Iglocska 3fb7764c00 First revision of the upgrade scripts
- .sql file to add all the new fields / tables
- admin tool to convert the old organisation fields to the new objects
- still missing a cleanup method (to remove the old organisation fields once the conversion is done)
2015-09-02 01:34:52 +02:00
Iglocska 704880ce59 Merge branch 'master' into feature/sg
Conflicts:
	VERSION.json
	app/Controller/AttributesController.php
	app/Controller/EventsController.php
	app/Model/Attribute.php
	app/Model/Event.php
	app/Model/Server.php
2015-08-30 13:29:05 +02:00
Iglocska 597e40fc0f Collection of fixes
- CSV export ignored the tag parameters
- tagging events didn't work as expected in some cases
- timing out and clicking on an admin action results in being redirected to a non-existing admin login page
- distribution setting ignored when uploading attachments
2015-08-27 09:44:58 +02:00
Iglocska 556688069a Resolved an issue that can lead to duplicate events showing up in MISP
- UUID uniqueness was previously not enforced
- changed the MYSQL.sql file to reflect the changes
- Added upgrade admin tool to remove duplicate events and make the database changes required
- Tweaked the tool for the attribute uuid fix so that it cannot created duplicate keys

- some minor fixes, such as automatically removing eventTag objects on event deletion
2015-08-25 10:32:26 +02:00
iglocska a93807439d Several bigger changes
- new functionality: Event blacklisting by UUID
  - site admins cna enable this feature in the server settings
  - enabling the feature will make the required db changes
  - any deleted event will automatically get blacklisted
  - this prevents deleted events from flowing back from a synced instance
  - site admins can manually add UUIDs to the list and remove entries

- fix to UUID duplication issues for attributes
  - simply run the admin script and it will regenerate the UUID of attributes that are duplicates, if any such exist
  - timestamps/event published status will not be affected

- config.core.php now includes a change that prevents from 404 exceptions being logged
  - the sync uses 404s to signal that an event with a given uuid does not exist when negotiating proposal synchronisation
  - this causes a dangerously high amount of noise in the logs
2015-08-17 16:10:10 +02:00
Iglocska 5273c2c5aa New functionality: API to download sample by hash
- simply pass an MD5 hash along and receive a sample if available zipped and base64 encoded in a response object
- pass any hash along with a flag set and receive any samples from events that have the passed hash

- Also, fix for an issue with the freetext import not using semi-colons as separators
2015-08-07 12:04:44 +02:00
Iglocska a181f3f2a8 Merge branch 'master' into feature/sg
Conflicts:
	VERSION.json
2015-07-24 16:02:31 +02:00
Iglocska 0481e6eb02 Merge branch 'master' into feature/sg
Conflicts:
	VERSION.json
	app/Controller/ServersController.php
	app/Controller/ShadowAttributesController.php
	app/Controller/UsersController.php
	app/Model/Event.php
	app/webroot/js/ajaxification.js
2015-06-29 14:27:16 +02:00
Iglocska ae0e1aeacb Merge branch 'feature/rpz' into hotfix-2.3.86
Conflicts:
	app/Console/Command/EventShell.php
	app/Model/Server.php
2015-06-23 17:19:08 +02:00
Iglocska c73f71f243 Merge branch 'master' into feature/sg
The merging is complete

Conflicts:
	VERSION.json
	app/Console/Command/ServerShell.php
	app/Controller/AppController.php
	app/Controller/AttributesController.php
	app/Controller/EventsController.php
	app/Controller/PostsController.php
	app/Controller/UsersController.php
	app/Model/Attribute.php
	app/Model/Event.php
	app/Model/Log.php
	app/Model/Server.php
	app/Model/User.php
	app/View/Elements/side_menu.ctp
	app/View/Users/admin_index.ctp
	app/webroot/js/ajaxification.js
2015-06-10 22:54:20 +02:00
Iglocska 2b0a1e5c4e Fixed an issue with log entries being truncated (Requires administrator action!)
- added a new entry to the admin tools (Administartion -> Administrative tools)
- converts title and change columns in the logs table to text from varchar(255)
2015-06-05 15:24:26 +02:00
iglocska 2fd600b44a Left of tuning of complex type tool in previous commit
- also, appcontroller now loads the security component, so that the blackhole override doesn't produce errors
2015-05-27 19:10:14 +02:00
iglocska 3584e52ccf Blackhole message due to csrf replaced with something more obvious, fixes #504
- user will get an explanation of the csrf error and that going back and refreshing the form will fix it
- also, there is a link that will take the user to the baseurl (which will redirect to the login page if the csrf issue occured on the login page)
2015-05-27 18:22:51 +02:00
iglocska 2f27d374d1 Opened up the rpz API for automation 2015-05-20 16:37:49 +02:00
iglocska 85e52810a4 Ignoring non MISP AUTHORIZATION headers, fixes #478
- Users being logged on would not be able to use the actions that are also used for automation
- Those actions trigger a check of the authorization header, which in certain use cases can be set with values that is outside of the scope of MISP

- MISP will now try to only detect MISP auth keys in the headers and if it detects something else it ignores it
2015-05-20 16:32:04 +02:00
iglocska 88d4a2da83 Merge branch 'certauth' into hotfix-2.3.64 2015-05-13 17:20:15 +02:00
iglocska b144831b4d Removed debug 2015-05-04 19:02:50 +02:00
iglocska d9f4e996f2 Parse authorization headers for a valid MISP auth key, fixes #478
- Keeps parsing until a valid auth key is found
2015-05-04 19:01:12 +02:00
Guilherme Capilé 3055d153f8 minor typo in the unset -- should be ['User']['gpgkey'] 2015-04-28 11:32:20 -03:00
Guilherme Capilé d2eaccec31 removed session handling from plugin and moved to AppController 2015-04-28 11:25:13 -03:00
Iglocska 9f1d47b6bc Added connection test
- also a fix to checkAuthUser
2015-04-20 23:49:18 +02:00
iglocska 51ea9c090d Further progress 2015-04-18 07:53:18 +02:00
Guilherme Capilé d0c3b44e34 Added client SSL certificate authentication as a CakePHP plugin 2015-04-16 22:14:43 -03:00
Iglocska 1e3db8a8ba Further work on the new version
- org checks fixed in a lot of places
- fixed the searches to work with the new organisations
2015-04-14 17:51:38 +02:00