Issue #2699 removed over cautious handle validation

xmpp does not limit the characters that can go in a handle
fixed id from room parsing to account for special characters


Former-commit-id: 24343a796d0089824dde2f7039cdf93ed0ebf88c
This commit is contained in:
Brian Clements 2014-02-07 10:06:06 -06:00
parent 25ad0e327c
commit 7d6e116b9f
2 changed files with 5 additions and 19 deletions

View file

@ -36,6 +36,7 @@ import org.jivesoftware.smackx.muc.Occupant;
* Mar 28, 2012 jkorman Initial creation * Mar 28, 2012 jkorman Initial creation
* Dec 6, 2013 2561 bclement removed ECF * Dec 6, 2013 2561 bclement removed ECF
* Jan 30, 2014 2698 bclement reworked convertFromRoom for venue participants * Jan 30, 2014 2698 bclement reworked convertFromRoom for venue participants
* Feb 3, 2014 2699 bclement fixed room id parsing when handle has special characters
* *
* </pre> * </pre>
* *
@ -75,7 +76,8 @@ public class IDConverter {
throw new IllegalArgumentException( throw new IllegalArgumentException(
"Room participant ids must have handle in resource"); "Room participant ids must have handle in resource");
} }
String host = StringUtils.parseServer(id); String cleanId = id.substring(0, id.length() - handle.length());
String host = StringUtils.parseServer(cleanId);
String name = null; String name = null;
Occupant occupant; Occupant occupant;

View file

@ -89,6 +89,7 @@ import com.raytheon.viz.ui.editor.IMultiPaneEditor;
* Jan 28, 2014 2698 bclement added error display text * Jan 28, 2014 2698 bclement added error display text
* Jan 30, 2014 2698 bclement added handle to join room with * Jan 30, 2014 2698 bclement added handle to join room with
* Feb 3, 2014 2699 bclement added default handle preference * Feb 3, 2014 2699 bclement added default handle preference
* Feb 7, 2014 2699 bclement removed handle validation
* *
* </pre> * </pre>
* *
@ -452,14 +453,7 @@ public class CreateSessionDialog extends CaveSWTDialog {
focusField = nameTF; focusField = nameTF;
errorMessages.add(err); errorMessages.add(err);
} }
err = validateHandle(); String handle = handleTF.getText().trim();
String handle = handleTF.getText();
if (err != null) {
if (focusField == null) {
focusField = handleTF;
}
errorMessages.add(err);
}
if (focusField == null) { if (focusField == null) {
CreateSessionData result = new CreateSessionData(); CreateSessionData result = new CreateSessionData();
@ -550,16 +544,6 @@ public class CreateSessionDialog extends CaveSWTDialog {
return err; return err;
} }
private String validateHandle() {
String handle = handleTF.getText().trim();
handleTF.setText(handle);
String err = null;
if (!Tools.isValidId(handle)) {
err = "Handle contains invalid characters.";
}
return err;
}
private void enableOrDisableSharedDisplays() { private void enableOrDisableSharedDisplays() {
boolean sharedSessionsEnabled = Activator boolean sharedSessionsEnabled = Activator
.getDefault() .getDefault()