nextcloud/tests/Core/Controller
Lukas Reschke 245080e647
Properly allow \OCP\Authentication\IApacheBackend to specify logout URL
Any `\OCP\Authentication\IApacheBackend` previously had to implement `getLogoutAttribute` which returns a string.
This string is directly injected into the logout `<a>` tag, so returning something like `href="foo"` would result
in `<a href="foo">`.

This is rather error prone and also in Nextcloud 12 broken as the logout entry has been moved with
054e161eb5 inside the navigation manager where one cannot simply inject attributes.

Thus this feature is broken in Nextcloud 12 which effectively leads to the bug described at nextcloud/user_saml#112,
people cannot logout anymore when using SAML using SLO. Basically in case of SAML you have a SLO url which redirects
you to the IdP and properly logs you out there as well.

Instead of monkey patching the Navigation manager I decided to instead change `\OCP\Authentication\IApacheBackend` to
use `\OCP\Authentication\IApacheBackend::getLogoutUrl` instead where it can return a string with the appropriate logout
URL. Since this functionality is only prominently used in the SAML plugin. Any custom app would need a small change but
I'm not aware of any and there's simply no way to fix this properly otherwise.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-08-30 14:42:46 +02:00
..
AvatarControllerTest.php Check the mimetype before reading the content and catch exception 2016-10-18 16:22:20 +02:00
ChangePasswordControllerTest.php Add bruteforce protection to changePersonalPassword 2017-04-18 17:55:51 +02:00
ClientFlowLoginControllerTest.php Add tests for ClientFlowLoginController 2017-05-18 20:49:08 +02:00
ContactsMenuControllerTest.php add contactsmenu popover 2017-04-26 09:26:53 +02:00
CssControllerTest.php Automatic injection for CssController 2017-05-10 09:42:40 +02:00
JsControllerTest.php Automatic injection for JsController 2017-05-10 09:42:15 +02:00
LoginControllerTest.php Fix remember redirect_url on failed login attempts 2017-04-25 09:38:19 +02:00
LostControllerTest.php Disable the API endpoints as well 2017-05-11 17:03:57 +02:00
OCSControllerTest.php Adjust existing bruteforce protection code 2017-04-14 13:42:40 +02:00
PreviewControllerTest.php Add cache 1 day cache to preview endpoint 2016-11-03 14:00:33 +01:00
TwoFactorChallengeControllerTest.php Properly allow \OCP\Authentication\IApacheBackend to specify logout URL 2017-08-30 14:42:46 +02:00
UserControllerTest.php Adds user controller tests 2016-12-30 13:26:26 +01:00