-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
0. Needs triagePending check for reproducibility or if it fits our roadmapPending check for reproducibility or if it fits our roadmapfeature: admin auditperformance 🚀technical debt
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
server/apps/admin_audit/lib/AppInfo/Application.php
Lines 269 to 279 in b2f01b7
| private function securityHooks(IAuditLogger $logger, | |
| EventDispatcherInterface $eventDispatcher): void { | |
| $eventDispatcher->addListener(IProvider::EVENT_SUCCESS, function (GenericEvent $event) use ($logger) { | |
| $security = new Security($logger); | |
| $security->twofactorSuccess($event->getSubject(), $event->getArguments()); | |
| }); | |
| $eventDispatcher->addListener(IProvider::EVENT_FAILED, function (GenericEvent $event) use ($logger) { | |
| $security = new Security($logger); | |
| $security->twofactorFailed($event->getSubject(), $event->getArguments()); | |
| }); | |
| } |
This will also open the door for unit-testable event listeners.
Steps to reproduce
- Look at
server/apps/admin_audit/lib/AppInfo/Application.php
Lines 269 to 279 in b2f01b7
private function securityHooks(IAuditLogger $logger, EventDispatcherInterface $eventDispatcher): void { $eventDispatcher->addListener(IProvider::EVENT_SUCCESS, function (GenericEvent $event) use ($logger) { $security = new Security($logger); $security->twofactorSuccess($event->getSubject(), $event->getArguments()); }); $eventDispatcher->addListener(IProvider::EVENT_FAILED, function (GenericEvent $event) use ($logger) { $security = new Security($logger); $security->twofactorFailed($event->getSubject(), $event->getArguments()); }); }
Expected behavior
Clean code
Installation method
None
Nextcloud Server version
master
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
cc @luka-nextcloud @blizzz as app maintainers
Metadata
Metadata
Assignees
Labels
0. Needs triagePending check for reproducibility or if it fits our roadmapPending check for reproducibility or if it fits our roadmapfeature: admin auditperformance 🚀technical debt