mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-07 01:18:27 +08:00
Update ImageCaptchaEndpoint.java
This commit is contained in:
parent
9218896f08
commit
397cd6fa5a
@ -65,6 +65,8 @@ public class ImageCaptchaEndpoint {
|
|||||||
String kaptchaText = captchaProducer.createText();
|
String kaptchaText = captchaProducer.createText();
|
||||||
String kaptchaValue = kaptchaText;
|
String kaptchaValue = kaptchaText;
|
||||||
if (captchaType.equalsIgnoreCase("Arithmetic")) {
|
if (captchaType.equalsIgnoreCase("Arithmetic")) {
|
||||||
|
//去除0,增加计算复杂度
|
||||||
|
kaptchaText = kaptchaText.replace("0", "");
|
||||||
Integer minuend = Integer.valueOf(kaptchaText.substring(0, 1));
|
Integer minuend = Integer.valueOf(kaptchaText.substring(0, 1));
|
||||||
Integer subtrahend = Integer.valueOf(kaptchaText.substring(1, 2));
|
Integer subtrahend = Integer.valueOf(kaptchaText.substring(1, 2));
|
||||||
if (minuend - subtrahend > 0) {
|
if (minuend - subtrahend > 0) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user