fix:图像验证码的大小不能超过500x200
This commit is contained in:
@@ -26,6 +26,10 @@ public class ImageCodeDTO {
|
||||
if (height == null) {
|
||||
height = 62;
|
||||
}
|
||||
|
||||
width = Math.min(width, 500);
|
||||
height = Math.min(height, 200);
|
||||
|
||||
LineCaptcha lineCaptcha = CaptchaUtil.createLineCaptcha(width, height, 4, lineCount);
|
||||
lineCaptcha.setGenerator(new RandomGenerator("0123456789", 4));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user