Commit 6c02c2b0 authored by Liang Ding's avatar Liang Ding

🎨 评论不校验邮箱

账号体系迁移到基于 GitHub 后为了保护用户隐私,授权登录后邮箱是返回空的,所以评论时不能校验邮箱
parent ec0646ee
...@@ -58,7 +58,7 @@ import java.util.Date; ...@@ -58,7 +58,7 @@ import java.util.Date;
* Comment management service. * Comment management service.
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.3.3.4, Jan 28, 2019 * @version 1.3.3.5, Feb 21, 2019
* @since 0.3.5 * @since 0.3.5
*/ */
@Service @Service
...@@ -315,15 +315,6 @@ public class CommentMgmtService { ...@@ -315,15 +315,6 @@ public class CommentMgmtService {
return ret; return ret;
} }
final String commentEmail = requestJSONObject.getString(Comment.COMMENT_EMAIL).trim().toLowerCase();
if (!Strings.isEmail(commentEmail)) {
LOGGER.log(Level.WARN, "Comment email is invalid[{0}]", commentEmail);
ret.put(Keys.MSG, langPropsService.get("mailInvalidLabel"));
return ret;
}
final String commentURL = requestJSONObject.optString(Comment.COMMENT_URL); final String commentURL = requestJSONObject.optString(Comment.COMMENT_URL);
if (!Strings.isURL(commentURL) || StringUtils.contains(commentURL, "<")) { if (!Strings.isURL(commentURL) || StringUtils.contains(commentURL, "<")) {
......
Subproject commit 3a5132b6ba245f04deab73e914c4de78df1cce07 Subproject commit a0daa3f9e2bd932cb6addefe573e2de5dfcf032a
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment