You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Wickersheimer Jeremy (JIRA)" <ji...@apache.org> on 2007/06/21 05:50:26 UTC

[jira] Commented: (OFBIZ-1091) Login process not reset properly after failure and hitting CLR

    [ https://issues.apache.org/jira/browse/OFBIZ-1091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506757 ] 

Wickersheimer Jeremy commented on OFBIZ-1091:
---------------------------------------------

After some investigation, in case of login error in SecurityEvents.java, the error message is displayed and the input is cleared (input.clear()) which empty the function stack.

In that state, pressing the ENTER button cause MenuEvents.addItem(pos, event); to be called causing a NPE at 
if (!trans.isOpen()) {
which is hidden by an InvocationTargetException catched in ButtonEventConfig (you get to call getCause().printStackTrace() on it to get the details)

At first i thought of disabling the buttons (except CLR) to prevent that but it would be too complicated, a much simpler solution is to disable the error message and append the "Enter user ID" message, and reseting the function stack to LOGIN.

Patch is joined.



> Login process not reset properly after failure and hitting CLR
> --------------------------------------------------------------
>
>                 Key: OFBIZ-1091
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1091
>             Project: OFBiz
>          Issue Type: Bug
>          Components: pos
>    Affects Versions: SVN trunk
>            Reporter: Wickersheimer Jeremy
>
> When the login fails (bad user or bad password), the POS display the error message.
> Then if you type something then enter, nothing seems to happen.
> Then if you type CLR, the POS ask for user Id, but internally act like the previous input was taken into account, thus getting directly to a login failure (or success) without asking password.
> Example:
> User Id: 
> # 5 <enter>
> Password: 
> # 5 <enter>
> User not found.
> # 1 <enter>
> User not found. (the display did not change, like nothin happen, and the input display still displays "5")
> # <CLR>
> User Id:
> # 1 <enter>
> ---> login success
> Alternatively replace the last input by something else than "1", you will get Password incorrect.
> The internal state is not reset properly after hitting CLR.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.