diff --git a/web/root/ecWeb/lib/captchaLib.ssjs b/web/root/ecWeb/lib/captchaLib.ssjs index a0b595362845056b1683a6190e36d00474a52606..a0f9b41a3535cb108338e8d4c9f1a430cb4f53ce 100644 --- a/web/root/ecWeb/lib/captchaLib.ssjs +++ b/web/root/ecWeb/lib/captchaLib.ssjs @@ -16,9 +16,10 @@ function insertCaptcha() { var d = directory(webIni.webRoot + "/lib/captchaAnsis/*"); var randomFont = Math.floor(Math.random() * (d.length)); - var f = directory(d[randomFont] + "*"); + while(d[randomFont].match(/CVS/) != null) randomFont = Math.floor(Math.random() * (d.length)); + var f = directory(d[randomFont] + "*.a??"); // We're looking for .asc and .ans files. var captchaString = ""; - print("<div style=background-color:black;height:100px;float:left;>"); + print("<div style='background-color:black;height:100px;float:left;'>"); for(i = 0; i < webIni.captchaLength; i++) { var randomLetter = Math.floor(Math.random() * (f.length)); var g = new File(f[randomLetter]); @@ -53,4 +54,4 @@ if(http_request.query.hasOwnProperty("font")) { } } closePage(); -} \ No newline at end of file +}