Openbravo Issue Tracking System - POS2
View Issue Details
0052883POS2Corepublic2023-06-26 16:552023-06-29 14:05
AugustoMauch 
AugustoMauch 
normalmajorhave not tried
closedfixed 
5
 
23Q3 
No
0052883: e.permissions is not iterable error when trying to log in
Under some circumstances, not clear yet, a "e.permissions is not iterable" error is displayed when trying to log in.

The problem seems to be caused by the application not being consistent when checking if a user has already logged in. Here [1] it checks if the session is active by checking if the logged user is not System, while here [2] it does it by checking if the user has a valid session. There are time where [2] evalues to true by [1] evaluates to false, resulting in the "e.permissions is not iterable" error.

To address the problem we will make sure the same condition (a combination of [1] and [2]) is checked in both places.

[1] https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/blob/master/src/org/openbravo/core2/login/Core2LoginUtilsServlet.java#L61 [^]
[2] https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/blob/master/src/org/openbravo/mobile/core/login/MobileCoreLoginUtilsServlet.java#L88 [^]
No steps to reproduce where found.
No tags attached.
blocks defect 0052852 closed AugustoMauch e.permissions is not iterable error when trying to log in 
Issue History
2023-06-29 09:31AugustoMauchTypedefect => backport
2023-06-29 09:31AugustoMauchTarget Version => 23Q3
2023-06-29 13:35hgbotNote Added: 0151838
2023-06-29 13:36hgbotNote Added: 0151839
2023-06-29 13:37hgbotResolutionopen => fixed
2023-06-29 13:37hgbotStatusscheduled => closed
2023-06-29 13:37hgbotNote Added: 0151840
2023-06-29 13:37hgbotFixed in Version => 23Q3
2023-06-29 13:37hgbotNote Added: 0151841
2023-06-29 14:05hgbotFixed in Version23Q3 => RR23Q3
2023-06-29 14:05hgbotNote Added: 0151844
2023-06-29 14:05hgbotNote Added: 0151845

Notes
(0151838)
hgbot   
2023-06-29 13:35   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1160 [^]
(0151839)
hgbot   
2023-06-29 13:36   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/561 [^]
(0151840)
hgbot   
2023-06-29 13:37   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1160 [^]
(0151841)
hgbot   
2023-06-29 13:37   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: 57b2f71a6cf4456cc9722003081b8854509c2b22
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 29-06-2023 13:35:42
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/57b2f71a6cf4456cc9722003081b8854509c2b22 [^]

Fixes ISSUE-52883: Be consistent when checking if the user is authenticated

Now both in MobileCoreLoginUtilsServlet and in Core2LoginUtilsServlet, the same condition will be check to
determine if the current user is authenticated. The isSessionActive has been moved from the latter to the
former

---
M src/org/openbravo/core2/login/Core2LoginUtilsServlet.java
---
(0151844)
hgbot   
2023-06-29 14:05   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: e2a5ee8e5daa5f495f3d4721fdf9498ffa8425bc
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 29-06-2023 14:03:59
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/e2a5ee8e5daa5f495f3d4721fdf9498ffa8425bc [^]

Fixes ISSUE-52883: Be consistent when checking if the user is authenticatedd

Now both in MobileCoreLoginUtilsServlet and in Core2LoginUtilsServlet, the same condition will be check to
determine if the current user is authenticated. The isSessionActive has been moved from the latter to the
former

---
M src/org/openbravo/mobile/core/login/MobileCoreLoginUtilsServlet.java
---
(0151845)
hgbot   
2023-06-29 14:05   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/561 [^]