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

Windows IIS: Logging in for the first time fails to redirect to dashboard upon sucessful login #5367

Open
4 tasks done
Mr-Kaos opened this issue Nov 1, 2023 · 1 comment

Comments

@Mr-Kaos
Copy link

Mr-Kaos commented Nov 1, 2023

Checklist

  • I verified that Kanboard is correctly installed
  • I verified that the problem does not come from a plugin
  • I verified that the problem is not already reported
  • I understand that Kanboard is in maintenance mode. It doesn't mean it's abandoned, but there is no significant feature development

Actual behaviour

After succesfully logging in to Kanbaord for the first time on any web browser, it fails to redirect the user to the dashboard page.
When the correct username and password is entered, no message is displayed on the login page. However, removing the query string from the URL (?controller=AuthController&action=login) after logging in redirects the user to their dashboard correctly, and does so presistently for every other login attempt performed on that browser.

Expected behaviour

After logging in with the correct credentials, the page should be redirected to the dashboard page.

Steps to reproduce

  1. Extract Kanbaord to any directory IIS has access to.
  2. Add the website in IIS as a new web application. (I configured it under the Default Web Site application, with the alias "Kanboard")
  3. Open the website using the bindings set to the website.
  4. Login as the admin user in any web browser.

Logs

Kanboard debug log when loggin in as admin on new browser - Github Gist.

Configuration

  • Kanboard version: 1.2.33
  • Database type and version: sqlite (default), MS SQL Server (2019)
  • PHP version: 8.1, 8.2
  • OS: Windows Server 2016, Windows Server 2019, Windows 10 22H2
  • Browser: Microsoft Edge, Google Chrome, Firefox, Internet Explorer.

The web servers are accessed locally on a local intranet. No external access is configured. All instances were tested with URL rewrite turned on and off.

@Mr-Kaos Mr-Kaos added the bug label Nov 1, 2023
@fguillot fguillot changed the title Logging in for the first time fails to redirect to dashboard upon sucessful login Windows IIS: Logging in for the first time fails to redirect to dashboard upon sucessful login Nov 2, 2023
@Mr-Kaos
Copy link
Author

Mr-Kaos commented Nov 2, 2023

A temprorary solution I have found to work around this problem is to comment out lines 327 - 331 and line 333 in the redirectAfterLogin() function within the BaseController.php file.

The function looks like the following with the comments:

protected function redirectAfterLogin()
{
	// if (session_exists('redirectAfterLogin') && ! filter_var(session_get('redirectAfterLogin'), FILTER_VALIDATE_URL)) {
	//     $redirect = session_get('redirectAfterLogin');
	//     session_remove('redirectAfterLogin');
	//     $this->response->redirect($redirect);
	// } else {
		$this->response->redirect($this->helper->url->to('DashboardController', 'show'));
	// }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants