You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
May 11 23:49:35 admired-nodes-1.localdomain node[160164]: TypeError: Cannot read property 'toLowerCase' of undefined
May 11 23:49:35 admired-nodes-1.localdomain node[160164]: at module.exports.run (/root/waline/node_modules/@waline/vercel/src/service/notify.js:88:67)
May 11 23:49:35 admired-nodes-1.localdomain node[160164]: at module.exports.postAction (/root/waline/node_modules/@waline/vercel/src/controller/comment.js:203:20)
May 11 23:49:35 admired-nodes-1.localdomain node[160164]: at cors (/root/waline/node_modules/@koa/cors/index.js:110:16)
May 11 23:49:35 admired-nodes-1.localdomain node[160164]: TypeError: Cannot read property 'toLowerCase' of undefined
May 11 23:49:35 admired-nodes-1.localdomain node[160164]: at module.exports.run (/root/waline/node_modules/@waline/vercel/src/service/notify.js:88:67)
May 11 23:49:35 admired-nodes-1.localdomain node[160164]: at module.exports.postAction (/root/waline/node_modules/@waline/vercel/src/controller/comment.js:203:20)
May 11 23:49:35 admired-nodes-1.localdomain node[160164]: at cors (/root/waline/node_modules/@koa/cors/index.js:110:16)
Lines 490-497 do not handle the situation where the mail field is empty. When the client is not forced to log in, it is allowed not to fill in the email address in the comments, resulting in an error.
Recommended solution:
When the backend API receives the comment request data, it performs verification checks on the fields and gives a default value to undefined fields.
github-actionsbot
changed the title
[Bug]: 评论未填邮件地址时,会报错
[Bug]: 评论未填邮件地址时,会报错 || [Bug]: When commenting without filling in the email address, an error will be reported
May 12, 2024
问题描述 | Describe the bug
报错信息如下:
导致报错的问题代码:
waline/packages/server/src/service/notify.js
Line 490 in 4e28685
490-497行, 未处理mail字段为空的情况。 客户端不强制登录的时候,评论里面是允许可以不填邮件地址的,从而导致报错。
推荐解决方案:
后端API接收到评论请求数据时, 对字段进行校验检查, 对于 undefined 的字段, 给定一个默认值。
问题网站 | Website URL
https://hello.com
服务部署在哪里? | Where your waline deploy?
Self Host
数据存储在哪里?| Where your comment data store?
SQLite
Problem description | Describe the bug
The error message is as follows:
The problem code that caused the error:
waline/packages/server/src/service/notify.js
Line 490 in 4e28685
Lines 490-497 do not handle the situation where the mail field is empty. When the client is not forced to log in, it is allowed not to fill in the email address in the comments, resulting in an error.
Recommended solution:
When the backend API receives the comment request data, it performs verification checks on the fields and gives a default value to undefined fields.
Question Website | Website URL
https://hello.com
Where is the service deployed? | Where your waline deploy?
Self Host
Where is the data stored? | Where your comment data store?
SQLite
The text was updated successfully, but these errors were encountered: