/trunk/TODO |
---|
2,7 → 2,6 |
- in setup : let the user enter a canonical url for the base config ( preset it with the current canonical url ) |
TODO Reproduce: |
- microsoft Edge freezing Login with vts challenge captcha, other browsers work fast |
- hcaptcha is sometimes not loaded (defined) |
SOMETIMES: load page completely new, go to login, captcha not loaded |
then go to another page (AJAX), go back, captcha is there. |
/trunk/plugins/viathinksoft/captcha/vts_challenge/OIDplusCaptchaPluginVtsClientChallenge.class.php |
---|
38,7 → 38,7 |
public function action($actionID, $params) { |
if ($actionID == 'get_challenge') { |
$complexity=500000; // TODO: make configurable |
$complexity=50000; // TODO: make configurable |
$server_secret='VtsClientChallenge:'.OIDplus::baseConfig()->getValue('SERVER_SECRET'); |
$min = 0; |
61,7 → 61,8 |
return OIDplusCaptchaPluginVtsClientChallenge.captchaResponse(); |
} |
function oidplus_captcha_reset() { |
return OIDplusCaptchaPluginVtsClientChallenge.captchaReset(true); |
var autosolve = false; |
return OIDplusCaptchaPluginVtsClientChallenge.captchaReset(autosolve); |
} |
</script> |
75,9 → 76,10 |
return '<noscript>'. |
'<p><font color="red">'._L('You need to enable JavaScript to solve the CAPTCHA.').'</font></p>'. |
'</noscript>'. |
'<input type="text" id="vts_validation_result" name="vts_validation_result" value="" style="display:none">'. |
'<input type="hidden" id="vts_validation_result" name="vts_validation_result" value="">'. |
'<script> |
OIDplusCaptchaPluginVtsClientChallenge.captchaReset(true); // try to solve it while the user enters the form |
var autosolve = false; // autosolving blocks the UI. |
OIDplusCaptchaPluginVtsClientChallenge.captchaReset(autosolve); |
$("form").submit(function(e){ |
if (!OIDplusCaptchaPluginVtsClientChallenge.currentresponse) { |
// if the user is too fast, then we will calculate it now |
/trunk/plugins/viathinksoft/captcha/vts_challenge/OIDplusCaptchaPluginVtsClientChallenge.js |
---|
31,15 → 31,8 |
var max = data[4]; |
var challenge_integrity = data[5]; |
//$("#loading").show(); |
// Without setTimeout, the load/hide of the spinner won't be visible?! |
setTimeout(function() { |
// Note: #loading not defined in oobe.php |
$("#loading").show(); |
},1); |
var vts_validation_result = null; |
console.log("start VTS challenge"); |
console.log("Start VTS challenge"); |
for (i=min; i<=max; i++) { |
if (challenge == sha3_512(starttime+"/"+ip_target+"/"+i)) { |
var answer = i; |
47,21 → 40,14 |
break; |
} |
} |
console.log("end VTS challenge"); |
console.log("End VTS challenge"); |
//$("#loading").hide(); |
// Without setTimeout, the load/hide of the spinner won't be visible?! |
setTimeout(function() { |
// Note: #loading not defined in oobe.php |
$("#loading").hide(); |
},100); |
return vts_validation_result; |
}, |
captchaReset: function(autosolve) { |
$.ajax({ |
url:"../../../../ajax.php", |
url:"ajax.php", |
method:"POST", |
//beforeSend: function(jqXHR, settings) { |
// $.xhrPool.abortAll(); |