Skip to content

fix: 修复邮件模板变量位于正文开头时无法替换的问题(indexOf 应包含位置0) - #9867

Open
RecursiveVar wants to merge 1 commit into
jeecgboot:mainfrom
RecursiveVar:fix/email-placeholder-replace
Open

fix: 修复邮件模板变量位于正文开头时无法替换的问题(indexOf 应包含位置0)#9867
RecursiveVar wants to merge 1 commit into
jeecgboot:mainfrom
RecursiveVar:fix/email-placeholder-replace

Conversation

@RecursiveVar

Copy link
Copy Markdown

问题

EmailSendMsgHandle#replaceContent 中使用 content.indexOf(realNameExp) > 0 判断变量是否存在,indexOf 返回 0 表示占位符位于正文开头,该情况被漏掉,用户会收到内容仍为 {REALNAME} / 登录 token 占位符的原始邮件。

修复

两处判断条件 > 0 改为 > -1(即包含位置 0)。

位置:jeecg-boot/jeecg-module-system/jeecg-system-biz/.../message/handle/impl/EmailSendMsgHandle.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant