diff --git a/lib/captcha/getdistorts.js b/lib/captcha/getdistorts.js index 25572df0..f16696c8 100644 --- a/lib/captcha/getdistorts.js +++ b/lib/captcha/getdistorts.js @@ -21,8 +21,8 @@ module.exports = async (width, height, numDistorts, distortion) => { , originy = await randomRange(0, height); //destionation coordinate for distortion point - const destx = await randomRange(Math.max(distortion, originx - distortion), Math.min(width - distortion, originx + distortion)) - , desty = await randomRange(Math.max(distortion, originy - (distortion * 2)), Math.min(height - distortion, originy + (distortion * 2))); + const destx = await randomRange(Math.max(distortion, originx - distortion), Math.min(width - distortion, originx + distortion)+1) + , desty = await randomRange(Math.max(distortion, originy - (distortion * 2)), Math.min(height - distortion, originy + (distortion * 2))+1); distorts.push([ {x:originx,y:originy}, diff --git a/migrations/0.8.0.js b/migrations/0.8.0.js index 3506df82..7fd44e17 100644 --- a/migrations/0.8.0.js +++ b/migrations/0.8.0.js @@ -11,7 +11,7 @@ module.exports = async(db, redis) => { }, 'captchaOptions.grid.falses': ['○','□','♘','♢','▽','△','♖','✧','♔','♘','♕','♗','♙','♧'], 'captchaOptions.grid.trues': ['●','■','♞','♦','▼','▲','♜','✦','♚','♞','♛','♝','♟','♣'], - 'captchaOptions.grid.question': 'Select the solid/filled icons', + 'captchaOptions.grid.question': 'Select the solid/filled icons', }, }); console.log('Clearing globalsettings cache');