NorthBridge / nexus-community

Other
2 stars 1 forks source link

Using the guest pass and entering an email in the Name field causes an XML error. #302

Closed kcavness closed 8 years ago

kcavness commented 8 years ago

This XML file does not appear to have any style information associated with it. The document tree is shown below.

FAILED missingParamFullName You must specify a name for the attendee who will be joining the meeting.

image

kdflint commented 8 years ago

Great catch Kenneth!

Problem was the A in AJAX.

The meeting join processor looks to a session value on the server to provide the parameter that the error is grumbling about. Why? because we use the same mechanism to join the meeting for guest users as we do for authenticated users.

Anyway, if SESSION is not updated with that form name value by means of AJAX, before the call executes to join the meeting, then this error occurs. To fix, I have made the call synchronous (though this is often not recommended due to UXP perils)

Seems to be working. Can I get a code review on the important new code?

If this method returns true, we go forward with the joinMeeting process. Otherwise we ask user to try again. Does this look foolproof?

function setPublicSession(oid, fname, mid, relativePath) {
    var xmlhttp = getXmlHttpRequest();
    var returnStatus;
    xmlhttp.onreadystatechange=function() {
        console.log(xmlhttp.readyState);
        if (xmlhttp.readyState == 4) {
            if (xmlhttp.status != 200) { 
                returnStatus = false;
            } else {
                returnStatus = true;
            }
        }
    };
    xmlhttp.open("GET", relativePath + "plugin/setPublicSession.php?oid=" + oid + "&timezone=" + getLocalTz() + "&fname=" + fname + "&uuid=" + mid, false);
    xmlhttp.send();
    return returnStatus;
}
kcavness commented 8 years ago

Insofar as I know code-y mc-codeface things on AJAX, this looks fine. Of course, I don't know exactly how you code the service via that PHP page ;-)

On Tue, Jun 14, 2016 at 3:56 PM, NorthBridge Technology Alliance < notifications@github.com> wrote:

Great catch Kenneth!

Problem was the A in AJAX.

The meeting join processor looks to a session value on the server for the username. Why? because we use the same mechanism to join the meeting for guest users as we do for authenticated users.

Anyway, if SESSION is not updated with that form name value by means of AJAX, before the call executes to join the meeting, then this error occurs. To fix, I have made the call synchronous (though this is often not recommended due to UXP perils)

Seems to be working. Can I get a code review on the new code?

If this method returns true, we go forward with the joinMeeting process. Otherwise we ask user to try again. Does this look foolproof?

function setPublicSession(oid, fname, mid, relativePath) { var xmlhttp = getXmlHttpRequest(); var returnStatus; xmlhttp.onreadystatechange=function() { console.log(xmlhttp.readyState); if (xmlhttp.readyState == 4) { if (xmlhttp.status != 200) { returnStatus = false; } else { returnStatus = true; } } }; xmlhttp.open("GET", relativePath + "plugin/setPublicSession.php?oid=" + oid + "&timezone=" + getLocalTz() + "&fname=" + fname + "&uuid=" + mid, false); xmlhttp.send(); return returnStatus; }

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NorthBridge/nexus-community/issues/302#issuecomment-226040742, or mute the thread https://github.com/notifications/unsubscribe/AFWt20K_n3H69qVA2PtnuxYuZMI4xWrfks5qLzGTgaJpZM4IwdgF .