1 (edited by dyrandz 01/17/2021 03:43:14 am)

Topic: FA 2.4.9 Login Error Msg

Every time I input an incorrect password, I didn't see the error message. It will just get back to blank username and password field.

Regards
-Dyrandz

Re: FA 2.4.9 Login Error Msg

I also experienced same behavior of 2.4.9

Re: FA 2.4.9 Login Error Msg

I have managed to isolate the problem. It seems that FA is picking up that a session is still active, from the following code:

if (isset($_SESSION['timeout'])) {
      include($path_to_root . "/access/login.php");
      exit;
} else
      login_fail();
}

This is despite you being logged out.

The only way I managed to fix it myself was by adding another condition to the IF statement:

if (isset($_SESSION['timeout']) && ($_SESSION['timeout'] == '')) {
      include($path_to_root . "/access/login.php");
      exit;
} else 
     login_fail();
}

There may be a better solution, but this was the only way I could get the system to pick up an error and show the user.

Hope this helps.

Re: FA 2.4.9 Login Error Msg

This was introduced with 2.4.9 previous releases did not have this problem.
I will put this one in mantis.
Thx.. tom.horton

Re: FA 2.4.9 Login Error Msg

Definitely worth logging to see if a better solution can be found.

Re: FA 2.4.9 Login Error Msg

Done
http://mantis.frontaccounting.com/view.php?id=5322

Re: FA 2.4.9 Login Error Msg

tom.horton wrote:

I have managed to isolate the problem. It seems that FA is picking up that a session is still active, from the following code:

if (isset($_SESSION['timeout'])) {
      include($path_to_root . "/access/login.php");
      exit;
} else
      login_fail();
}

This is despite you being logged out.

The only way I managed to fix it myself was by adding another condition to the IF statement:

if (isset($_SESSION['timeout']) && ($_SESSION['timeout'] == '')) {
      include($path_to_root . "/access/login.php");
      exit;
} else 
     login_fail();
}

There may be a better solution, but this was the only way I could get the system to pick up an error and show the user.

Hope this helps.

What file to add to this temporary fix?

Re: FA 2.4.9 Login Error Msg

This was in the file:

includes/session.inc

Line 556 onwards

Re: FA 2.4.9 Login Error Msg

Thanks tom

Re: FA 2.4.9 Login Error Msg

Fixed by Janusz

https://sourceforge.net/p/frontaccounting/git/ci/e7fb3a02d86a3bc88387280561d802d4744e8885/

Re: FA 2.4.9 Login Error Msg

It's working now

Thanks!