This is an automated email from the ASF dual-hosted git repository.

solomax pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openmeetings.git


The following commit(s) were added to refs/heads/master by this push:
     new dc2ba5cb3 [OPENMEETINGS-2837] websession is created only after valid 
password is entered
dc2ba5cb3 is described below

commit dc2ba5cb3aacde258b25e73c733459dbd1a69ddc
Author: Maxim Solodovnik <[email protected]>
AuthorDate: Fri Sep 11 14:49:33 2026 +0700

    [OPENMEETINGS-2837] websession is created only after valid password is 
entered
---
 .../apache/openmeetings/web/app/Application.java   |  12 +-
 .../apache/openmeetings/web/app/WebSession.java    |  89 +++++---
 .../apache/openmeetings/web/pages/HashPage.java    | 242 ++++++++++++---------
 .../web/pages/InvitationPasswordDialog.java        |  11 +-
 .../apache/openmeetings/web/room/RoomPanel.java    |   7 +-
 .../calendar/TestAppointmentAddAppointment.java    |   2 +-
 .../apache/openmeetings/ws/TestUserService.java    |   2 +-
 7 files changed, 222 insertions(+), 143 deletions(-)

diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
index 16fc7b2d7..af41a47fa 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
@@ -523,15 +523,15 @@ public class Application extends 
AuthenticatedWebApplication implements IApplica
                String link = "";
                Room r = i.getRoom();
                User u = i.getInvitee();
+               PageParameters pp = new PageParameters();
+               pp.add(INVITATION_HASH, i.getHash());
+               if (u.getLanguageId() > 0) {
+                       pp.add("language", u.getLanguageId());
+               }
                if (r != null) {
                        if ((i.isPasswordProtected() && !r.isOwner(u.getId())) 
// invitation is password-protected and invitee is not owner
                                        || Type.CONTACT == u.getType() || 
Type.EXTERNAL == u.getType() || !get().roomManager.isRoomAllowedToUser(r, u)) 
// no-access
                        {
-                               PageParameters pp = new PageParameters();
-                               pp.add(INVITATION_HASH, i.getHash());
-                               if (u.getLanguageId() > 0) {
-                                       pp.add("language", u.getLanguageId());
-                               }
                                link = urlForPage(HashPage.class, pp, baseUrl);
                        } else {
                                link = getRoomUrlFragment(r.getId()).getLink();
@@ -539,7 +539,7 @@ public class Application extends 
AuthenticatedWebApplication implements IApplica
                }
                Recording rec = i.getRecording();
                if (rec != null) {
-                       link = urlForPage(HashPage.class, new 
PageParameters().add(INVITATION_HASH, i.getHash()), baseUrl);
+                       link = urlForPage(HashPage.class, pp, baseUrl);
                }
                return link;
        }
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java
index 2676f15ac..e218ceb45 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java
@@ -52,6 +52,7 @@ import org.apache.openmeetings.db.dao.user.GroupDao;
 import org.apache.openmeetings.db.dao.user.UserDao;
 import org.apache.openmeetings.db.entity.room.Invitation;
 import org.apache.openmeetings.db.entity.room.Room;
+import org.apache.openmeetings.db.entity.room.Invitation.Valid;
 import org.apache.openmeetings.db.entity.server.RemoteSessionObject;
 import org.apache.openmeetings.db.entity.server.SOAPLogin;
 import org.apache.openmeetings.db.entity.server.Sessiondata;
@@ -196,10 +197,62 @@ public class WebSession extends 
AbstractAuthenticatedWebSession implements IWebS
                }
        }
 
-       public void checkHashes(StringValue secure, StringValue inviteStr) {
-               log.debug("checkHashes, secure: '{}', invitation: '{}'", 
secure, inviteStr);
+       public Invitation checkInviteHash(StringValue invite, boolean 
passwordValid) {
+               log.debug("checkInviteHash: invitation: '{}'", invite);
                try {
-                       log.debug("checkHashes, has soap in session ? '{}'", 
(soap != null));
+                       if (invite.isEmpty()) {
+                               return invitation; // nothing to check
+                       }
+                       Invitation local = 
inviteDao.getByHash(invite.toString(), false);
+                       // invitation should be re-checked each time, due to 
PERIOD invitation can be
+                       // 1) not ready
+                       // 2) already expired
+                       // otherwise already logged-in with the same hash
+                       if (local != null && invitation != null
+                                       && 
invitation.getId().equals(local.getId())
+                                       && (local.isAllowEntry() || 
(!local.isAllowEntry() && local.getValid() == Valid.ONE_TIME)))
+                       {
+                               return invitation; // session invitation is 
still valid
+                       }
+                       if (isSignedIn()) {
+                               log.debug("invitation: Session is authorized, 
going to invalidate");
+                               invalidateNow();
+                       }
+                       if (local != null && local.isAllowEntry()) {
+                               if (local.isPasswordProtected() && 
!passwordValid) {
+                                       // the session will NOT be authorized, 
we need to check password first
+                                       return local;
+                               }
+                               invitation = local;
+                               Room r = null;
+                               Set<Right> hrights = new HashSet<>();
+                               if (invitation.getRoom() != null) {
+                                       r = invitation.getRoom();
+                               } else if (invitation.getAppointment() != null 
&& invitation.getAppointment().getRoom() != null) {
+                                       r = 
invitation.getAppointment().getRoom();
+                               } else if (invitation.getRecording() != null) {
+                                       recordingId = 
invitation.getRecording().getId();
+                                       inviteDao.markUsed(invitation);
+                               }
+                               if (r != null) {
+                                       redirectHash(r, () -> 
inviteDao.markUsed(invitation));
+                                       hrights.add(Right.ROOM);
+                                       roomId = r.getId();
+                               }
+                               setUser(invitation.getInvitee(), hrights);
+                       }
+               } catch (RedirectToUrlException e) {
+                       throw e;
+               } catch (Exception e) {
+                       log.error("Unexpected exception while checking 
inviteHash", e);
+               }
+               return invitation;
+       }
+
+       public void checkSecureHash(StringValue secure) {
+               log.debug("checkSecureHash: secure: '{}'", secure);
+               try {
+                       log.debug("checkSecureHash: has soap in session ? 
'{}'", (soap != null));
                        if (!secure.isEmpty() && (soap == null || 
!soap.getHash().equals(secure.toString()))) {
                                // otherwise already logged-in with the same 
hash
                                if (isSignedIn()) {
@@ -208,38 +261,10 @@ public class WebSession extends 
AbstractAuthenticatedWebSession implements IWebS
                                }
                                signIn(secure.toString(), true);
                        }
-                       if (!inviteStr.isEmpty()) {
-                               // invitation should be re-checked each time, 
due to PERIOD invitation can be
-                               // 1) not ready
-                               // 2) already expired
-                               // otherwise already logged-in with the same 
hash
-                               if (isSignedIn()) {
-                                       log.debug("invitation: Session is 
authorized, going to invalidate");
-                                       invalidateNow();
-                               }
-                               invitation = 
inviteDao.getByHash(inviteStr.toString(), false);
-                               Room r = null;
-                               if (invitation != null && 
invitation.isAllowEntry()) {
-                                       Set<Right> hrights = new HashSet<>();
-                                       if (invitation.getRoom() != null) {
-                                               r = invitation.getRoom();
-                                       } else if (invitation.getAppointment() 
!= null && invitation.getAppointment().getRoom() != null) {
-                                               r = 
invitation.getAppointment().getRoom();
-                                       } else if (invitation.getRecording() != 
null) {
-                                               recordingId = 
invitation.getRecording().getId();
-                                       }
-                                       if (r != null) {
-                                               redirectHash(r, () -> 
inviteDao.markUsed(invitation));
-                                               hrights.add(Right.ROOM);
-                                               roomId = r.getId();
-                                       }
-                                       setUser(invitation.getInvitee(), 
hrights);
-                               }
-                       }
                } catch (RedirectToUrlException e) {
                        throw e;
                } catch (Exception e) {
-                       log.error("Unexpected exception while checking hashes", 
e);
+                       log.error("Unexpected exception while checking 
secureHash", e);
                }
        }
 
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/HashPage.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/HashPage.java
index 8c354380f..ed9a80aec 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/HashPage.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/HashPage.java
@@ -45,6 +45,7 @@ import org.apache.openmeetings.web.room.VideoSettings;
 import org.apache.openmeetings.web.user.record.VideoInfo;
 import org.apache.openmeetings.web.user.record.VideoPlayer;
 import org.apache.wicket.AttributeModifier;
+import org.apache.wicket.Component;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.panel.EmptyPanel;
@@ -64,6 +65,7 @@ public class HashPage extends BaseInitedPage implements 
IUpdatable {
        public static final String APP_TYPE_SETTINGS = "settings";
        public static final String SWF_KEY = "swf";
        public static final String PANEL_MAIN = "panel-main";
+       public static final String I_PASS_ID = "i-pass";
        public static final String PANEL_RECORDING = "panel-recording";
        public static final String INVITATION_HASH = "invitation";
        static final String HASH = "secure";
@@ -74,10 +76,12 @@ public class HashPage extends BaseInitedPage implements 
IUpdatable {
        private boolean error = true;
        private MainPanel mainPanel = null;
        private RoomPanel roomPanel = null;
+       private WebMarkupContainer passwdDialog = new EmptyPanel(I_PASS_ID);
        private final StringValue secure;
        private final StringValue invitation;
        private final StringValue swf;
        private final StringValue app;
+       private final long lang;
 
        @Inject
        private RoomDao roomDao;
@@ -89,128 +93,144 @@ public class HashPage extends BaseInitedPage implements 
IUpdatable {
                invitation = p.get(INVITATION_HASH);
                swf = p.get(SWF_KEY);
                app = swf.isEmpty() ? p.get(APP_KEY) : swf;
+               lang = p.get(LANG).toLong(-1L);
+       }
 
-               WebSession ws = WebSession.get();
-               ws.checkHashes(secure, invitation);
-               long lang = p.get(LANG).toLong(-1L);
+       private void setLanguage() {
                if (lang > -1) {
+                       WebSession ws = WebSession.get();
                        ws.setLanguage(lang);
                        ws.setLocale(LocaleHelper.getLocale(lang));
                }
        }
 
-       private void createRoom(Long roomId) {
-               getLoader().setVisible(true);
-               getHeader().setVisible(false);
+       private void createRoom(Long roomId, boolean visible) {
+               if (roomPanel != null) {
+                       return; // all done
+               }
+               Room room = roomDao.get(roomId); // this call required to 
eager-fetch everything
                // need to re-fetch Room object to initialize all collections
-               Room room = roomDao.get(roomId);
                if (room != null && !room.isDeleted()) {
+                       getLoader().setVisible(true);
+                       getHeader().setVisible(false);
                        error = false;
                        roomPanel = new RoomPanel(CHILD_ID, room);
+                       
roomPanel.setOutputMarkupPlaceholderTag(true).setVisible(visible);
                        mainPanel = new MainPanel(PANEL_MAIN, roomPanel);
                        replace(mainPanel);
                }
        }
 
-       @Override
-       protected void onInitialize() {
-               super.onInitialize();
+       private void processApp() {
+               if (APP_TYPE_NETWORK.equals(app.toString())) {
+                       replace(new 
NetTestPanel(PANEL_MAIN).add(AttributeModifier.append("class", "app")));
+                       error = false;
+               } else if (APP_TYPE_SETTINGS.equals(app.toString())) {
+                       replace(new VideoSettings(PANEL_MAIN)
+                               .replace(new OmWebSocketPanel("ws-panel") {
+                                       private static final long 
serialVersionUID = 1L;
+                                       private WsClient c = null;
 
-               WebSession ws = WebSession.get();
-               String errorMsg = getString("invalid.hash");
-               recContainer.setVisible(false);
-               add(new EmptyPanel(PANEL_MAIN).setVisible(false));
-               if (!invitation.isEmpty()) {
-                       Invitation i = ws.getInvitation();
-                       if (i == null) {
-                               errorMsg = getString("error.hash.invalid");
-                       } else if (!i.isAllowEntry()) {
-                               FastDateFormat sdf = 
FormatHelper.getDateTimeFormat(i.getInvitee());
-                               errorMsg = Valid.ONE_TIME == i.getValid()
-                                               ? getString("error.hash.used")
-                                               : String.format("%s %s - %s, 
%s", getString("error.hash.period")
-                                                               , 
sdf.format(i.getValidFrom()), sdf.format(i.getValidTo())
-                                                               , 
i.getInvitee().getTimeZoneId());
-                       } else {
-                               Recording rec = i.getRecording();
-                               if (rec != null) {
-                                       
videoInfo.setVisible(!i.isPasswordProtected());
-                                       
videoPlayer.setVisible(!i.isPasswordProtected());
-                                       if (!i.isPasswordProtected()) {
-                                               videoInfo.update(null, rec);
-                                               videoPlayer.update(null, rec);
+                                       @Override
+                                       protected void 
onConnect(ConnectedMessage message) {
+                                               c = new 
WsClient(message.getSessionId(), message.getKey().hashCode());
                                        }
-                                       recContainer.setVisible(true);
-                                       error = false;
-                               }
-                               Room r = i.getRoom();
-                               if (r != null && !r.isDeleted()) {
-                                       createRoom(r.getId());
-                                       if (i.isPasswordProtected() && 
roomPanel != null) {
-                                               
mainPanel.getChat().setVisible(false);
-                                               
roomPanel.setOutputMarkupPlaceholderTag(true).setVisible(false);
+
+                                       @Override
+                                       protected void 
onConnect(WebSocketRequestHandler handler) {
+                                               super.onConnect(handler);
+                                               handler.appendJavaScript(
+                                                               
String.format("VideoSettings.init(%s);VideoSettings.open();"
+                                                                               
, VideoSettings.getInitJson("noclient")
+                                                                               
        .put("infoMsg", getString("close.settings.tab"))));
                                        }
-                               }
-                       }
-               } else if (!secure.isEmpty()) {
-                       Long recId = getRecordingId(), roomId = ws.getRoomId();
-                       if (recId == null && roomId == null) {
-                               errorMsg = getString("1599");
-                       } else if (recId != null) {
-                               recContainer.setVisible(true);
-                               Recording rec = recDao.get(recId);
-                               videoInfo.update(null, rec);
-                               videoPlayer.update(null, rec);
-                               error = false;
-                       } else {
-                               createRoom(roomId);
+
+                                       @Override
+                                       protected IWsClient getWsClient() {
+                                               return c;
+                                       }
+                               })
+                               .add(new OmAjaxClientInfoBehavior()));
+                       error = false;
+               }
+       }
+
+       private String processInvitation() {
+               WebSession ws = WebSession.get();
+               Invitation i = ws.checkInviteHash(invitation, false);
+               if (i == null) {
+                       return getString("error.hash.invalid");
+               } else if (!i.isAllowEntry()) {
+                       FastDateFormat sdf = 
FormatHelper.getDateTimeFormat(i.getInvitee());
+                       return Valid.ONE_TIME == i.getValid()
+                                       ? getString("error.hash.used")
+                                       : String.format("%s %s - %s, %s", 
getString("error.hash.period")
+                                                       , 
sdf.format(i.getValidFrom()), sdf.format(i.getValidTo())
+                                                       , 
i.getInvitee().getTimeZoneId());
+               } else {
+                       passwdDialog = new InvitationPasswordDialog(I_PASS_ID, 
i, this);
+                       Recording rec = i.getRecording();
+                       Room r = i.getRoom();
+                       error = rec == null && r == null;
+                       if (ws.getInvitation() != null && r != null) {
+                               createRoom(r.getId(), false);
                        }
+                       update(null);
                }
+               return null;
+       }
 
+       private String processSecure() {
+               WebSession ws = WebSession.get();
+               ws.checkSecureHash(secure);
+               Long recId = getRecordingId(), roomId = ws.getRoomId();
+               if (recId == null && roomId == null) {
+                       return getString("1599");
+               }
+               error = false;
+               if (recId != null) {
+                       recContainer.setVisible(true);
+                       Recording rec = recDao.get(recId);
+                       videoInfo.update(null, rec);
+                       videoPlayer.update(null, rec);
+               } else {
+                       createRoom(roomId, true);
+               }
+               return null;
+       }
+
+       @Override
+       protected void onInitialize() {
+               setLanguage();
+               super.onInitialize();
+
+               String errorMsg = getString("invalid.hash");
+               recContainer
+                       .setOutputMarkupPlaceholderTag(true)
+                       .setOutputMarkupId(true)
+                       .setVisible(false);
+               add(new EmptyPanel(PANEL_MAIN)
+                       .setOutputMarkupPlaceholderTag(true)
+                       .setOutputMarkupId(true)
+                       .setVisible(false));
                if (!app.isEmpty()) {
-                       if (APP_TYPE_NETWORK.equals(app.toString())) {
-                               replace(new 
NetTestPanel(PANEL_MAIN).add(AttributeModifier.append("class", "app")));
-                               error = false;
-                       }
-                       if (APP_TYPE_SETTINGS.equals(app.toString())) {
-                               replace(new VideoSettings(PANEL_MAIN)
-                                       .replace(new 
OmWebSocketPanel("ws-panel") {
-                                               private static final long 
serialVersionUID = 1L;
-                                               private WsClient c = null;
-
-                                               @Override
-                                               protected void 
onConnect(ConnectedMessage message) {
-                                                       c = new 
WsClient(message.getSessionId(), message.getKey().hashCode());
-                                               }
-
-                                               @Override
-                                               protected void 
onConnect(WebSocketRequestHandler handler) {
-                                                       
super.onConnect(handler);
-                                                       
handler.appendJavaScript(
-                                                                       
String.format("VideoSettings.init(%s);VideoSettings.open();"
-                                                                               
        , VideoSettings.getInitJson("noclient")
-                                                                               
                .put("infoMsg", getString("close.settings.tab"))));
-                                               }
-
-                                               @Override
-                                               protected IWsClient 
getWsClient() {
-                                                       return c;
-                                               }
-                                       })
-                                       .add(new OmAjaxClientInfoBehavior()));
-                               error = false;
-                       }
+                       processApp();
+               } else if (!invitation.isEmpty()) {
+                       errorMsg = processInvitation();
+               } else if (!secure.isEmpty()) {
+                       errorMsg = processSecure();
                }
-               
add(recContainer.add(videoInfo.setOutputMarkupPlaceholderTag(true),
-                               
videoPlayer.setOutputMarkupPlaceholderTag(true)), new 
InvitationPasswordDialog("i-pass", this));
-               remove(urlParametersReceivingBehavior);
+
+               add(recContainer.add(videoInfo, videoPlayer), passwdDialog);
                add(new IconTextModal("access-denied")
                                .withLabel(errorMsg)
                                .withErrorIcon()
                                .addButton(OmModalCloseButton.of("54"))
                                .header(new ResourceModel("invalid.hash"))
                                .show(error)
-                               );
+               );
+
+               remove(urlParametersReceivingBehavior);
        }
 
        @Override
@@ -221,11 +241,39 @@ public class HashPage extends BaseInitedPage implements 
IUpdatable {
        @Override
        public void update(AjaxRequestTarget target) {
                Invitation i = WebSession.get().getInvitation();
-               if (i.getRoom() != null && roomPanel != null) {
-                       roomPanel.show(target);
-               } else if (i.getRecording() != null) {
-                       target.add(videoInfo.update(target, 
i.getRecording()).setVisible(true)
-                                       , videoPlayer.update(target, 
i.getRecording()).setVisible(true));
+               if (error || i == null) {
+                       return;
+               }
+               setLanguage();
+               Recording rec = i.getRecording();
+               if (i.getRoom() != null) {
+                       createRoom(i.getRoom().getId(), true);
+                       // invitation is in session so we can show the room
+                       if (roomPanel.getMainPanel() != null) {
+                               // everything was inited
+                               roomPanel.show(target);
+                       } else {
+                               roomPanel.setVisible(true);
+                       }
+               } else if (rec != null) {
+                       recContainer.setVisible(true);
+                       videoInfo.update(target, rec).setVisible(true);
+                       videoPlayer.update(target, rec).setVisible(true);
+               }
+               if (target != null) {
+                       for (Component comp : new Component[]{getLoader(), 
getHeader(), mainPanel, roomPanel, recContainer}) {
+                               if (comp != null) {
+                                       target.add(comp);
+                               }
+                       }
+                       target.appendJavaScript("""
+                               const elem = document.querySelector('html');
+                               Object.entries({
+                                       'xml:lang': '%1$s',
+                                       'lang': '%1$s',
+                                       'dir': '%2$s'
+                               }).forEach(kv => elem.setAttribute(kv[0], 
kv[1]));
+                               """.formatted(getLanguageCode(), isRtl() ? 
"rtl" : "ltr"));
                }
        }
 }
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/InvitationPasswordDialog.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/InvitationPasswordDialog.java
index eec1afc25..4a071d6d4 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/InvitationPasswordDialog.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/InvitationPasswordDialog.java
@@ -29,6 +29,7 @@ import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.form.PasswordTextField;
 import org.apache.wicket.model.Model;
 import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.util.string.StringValue;
 import org.apache.wicket.validation.IValidatable;
 import org.apache.wicket.validation.IValidator;
 import org.apache.wicket.validation.ValidationError;
@@ -44,10 +45,12 @@ public class InvitationPasswordDialog extends 
Modal<Invitation> {
        private final Form<Void> form = new Form<>("form");
        private final PasswordTextField password = new 
PasswordTextField("password", Model.of((String)null));
        private final IUpdatable comp;
+       private final Invitation i;
 
-       public InvitationPasswordDialog(String id, IUpdatable comp) {
+       public InvitationPasswordDialog(String id, Invitation i, IUpdatable 
comp) {
                super(id);
                this.comp = comp;
+               this.i = i;
        }
 
        @Override
@@ -61,7 +64,7 @@ public class InvitationPasswordDialog extends 
Modal<Invitation> {
 
                        @Override
                        public void validate(IValidatable<String> validatable) {
-                               if 
(!CryptProvider.get().verify(validatable.getValue(), 
WebSession.get().getInvitation().getPassword())) {
+                               if 
(!CryptProvider.get().verify(validatable.getValue(), i.getPassword())) {
                                        validatable.error(new 
ValidationError(getString("error.bad.password")));
                                }
                        }
@@ -97,8 +100,7 @@ public class InvitationPasswordDialog extends 
Modal<Invitation> {
                        }
                }); //check
                super.onInitialize();
-               Invitation i = WebSession.get().getInvitation();
-               show(i != null && i.isPasswordProtected());
+               show(WebSession.get().getInvitation() == null && i != null && 
i.isPasswordProtected());
        }
 
        @Override
@@ -112,6 +114,7 @@ public class InvitationPasswordDialog extends 
Modal<Invitation> {
        }
 
        protected void onSubmit(AjaxRequestTarget target) {
+               
WebSession.get().checkInviteHash(StringValue.valueOf(i.getHash()), true);
                comp.update(target);
                close(target);
        }
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
index c84960d29..d84907648 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
@@ -671,8 +671,11 @@ public class RoomPanel extends BasePanel {
 
        public void show(IPartialPageRequestHandler handler) {
                getMainPanel().getChat().toggle(handler, 
!r.isHidden(RoomElement.CHAT));
-               handler.add(this.setVisible(true));
-               handler.appendJavaScript("Room.load();");
+               this.setVisible(true);
+               if (handler != null) {
+                       handler.add(this);
+                       handler.appendJavaScript("Room.load();");
+               }
        }
 
        @Override
diff --git 
a/openmeetings-web/src/test/java/org/apache/openmeetings/calendar/TestAppointmentAddAppointment.java
 
b/openmeetings-web/src/test/java/org/apache/openmeetings/calendar/TestAppointmentAddAppointment.java
index cd639d3ad..f637bfa43 100644
--- 
a/openmeetings-web/src/test/java/org/apache/openmeetings/calendar/TestAppointmentAddAppointment.java
+++ 
b/openmeetings-web/src/test/java/org/apache/openmeetings/calendar/TestAppointmentAddAppointment.java
@@ -175,7 +175,7 @@ class TestAppointmentAddAppointment extends 
AbstractWicketTesterTest {
 
                WebSession ws = WebSession.get();
                Appointment a1 = appointmentDao.get(a.getId());
-               ws.checkHashes(StringValue.valueOf(""), 
StringValue.valueOf(a1.getMeetingMembers().get(0).getInvitation().getHash()));
+               
ws.checkInviteHash(StringValue.valueOf(a1.getMeetingMembers().get(0).getInvitation().getHash()),
 true);
                assertTrue(ws.isSignedIn(), "Login via secure hash should be 
successful");
        }
 
diff --git 
a/openmeetings-web/src/test/java/org/apache/openmeetings/ws/TestUserService.java
 
b/openmeetings-web/src/test/java/org/apache/openmeetings/ws/TestUserService.java
index 1f86a238f..69cdf1bea 100644
--- 
a/openmeetings-web/src/test/java/org/apache/openmeetings/ws/TestUserService.java
+++ 
b/openmeetings-web/src/test/java/org/apache/openmeetings/ws/TestUserService.java
@@ -109,7 +109,7 @@ class TestUserService extends AbstractWebServiceTest {
                ServiceResult r1 = getHash(sid, false);
                assertEquals(Type.SUCCESS.name(), r1.getType(), "OM Call should 
be successful");
                WebSession ws = WebSession.get();
-               ws.checkHashes(StringValue.valueOf(r1.getMessage()), 
StringValue.valueOf(""));
+               ws.checkSecureHash(StringValue.valueOf(r1.getMessage()));
                assertTrue(ws.isSignedIn(), "Login via secure hash should be 
successful");
                Long userId = WebSession.getUserId();
                assertNotEquals(adminId, userId);

Reply via email to