Fix code problem on autologins.
This commit is contained in:
parent
dbe91182f6
commit
2d38dccf42
@ -496,37 +496,27 @@ function websso()
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if((para.item(j).type == "text") || (para.item(j).type == "password"))
|
if((para.item(j).type == "text") || (para.item(j).type == "password"))
|
||||||
{
|
{
|
||||||
sKey = para.item(j).name;
|
sKey = para.item(j).name;
|
||||||
logMessage('Getting: ' + secretId + ':' + sKey);
|
logMessage('Getting: ' + secretId + ':' + sKey);
|
||||||
|
|
||||||
theValue = new String;
|
theValue = new String;
|
||||||
res = obj.miCASAReadKey(secretId, sKey, theValue);
|
res = obj.miCASAReadKey(secretId, sKey, theValue);
|
||||||
|
|
||||||
if (res == 0)
|
if (res == 0)
|
||||||
{
|
{
|
||||||
var ele = window._content.document.getElementsByName(sKey);
|
var ele = window._content.document.getElementsByName(sKey);
|
||||||
if (ele != null)
|
if (ele != null)
|
||||||
{
|
{
|
||||||
ele[0].value = theValue.value;
|
ele[0].value = theValue.value;
|
||||||
}
|
if (ele[0].type == "password")
|
||||||
|
{
|
||||||
|
formToSubmit = ele[0].form;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// locate and save off the form of the password element
|
|
||||||
if (para.item(j).type == "password")
|
|
||||||
{
|
|
||||||
formToSubmit = para.item(j).parentNode.parentNode;
|
|
||||||
|
|
||||||
// did we get it?
|
|
||||||
if (formToSubmit.type != "form")
|
|
||||||
{
|
|
||||||
formToSubmit = formToSubmit.parentNode;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (err)
|
catch (err)
|
||||||
{
|
{
|
||||||
@ -561,7 +551,8 @@ function websso()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
formToSubmit = window._content.document.forms[0].submit();
|
//formToSubmit = window._content.document.forms[0].submit();
|
||||||
|
logMessage("One form");
|
||||||
}
|
}
|
||||||
|
|
||||||
//try it now
|
//try it now
|
||||||
@ -1273,3 +1264,5 @@ logMessage('adding event listener');
|
|||||||
window.addEventListener("load",websso,true) ;
|
window.addEventListener("load",websso,true) ;
|
||||||
window.addEventListener("submit",promptuser,true) ;
|
window.addEventListener("submit",promptuser,true) ;
|
||||||
|
|
||||||
|
//HTMLFormElement.prototype._submit = HTMLFormElement.prototype.submit;
|
||||||
|
//HTMLFormElement.prototype.submit = promptuser;
|
Loading…
Reference in New Issue
Block a user