Comments (7)
官网是同样的部署环境,没办法复现这个问题,你提供下账号登下你后台看下吧。
The official website has the same deployment environment. There is no way to reproduce this problem. You can log in with your account and take a look at the background.
from waline.
approved类型status参数为mine的时候可以正常获取到评论
status参数为all到时候返回
{"errno":500,"errmsg":"Input data should be a String"}
from waline.
vercel后台log
�[36m[2023-12-24T14:45:23.673] [8] [DEBUG]�[39m - Post Comment Start!
�[36m[2023-12-24T14:45:23.673] [8] [DEBUG]�[39m - Post Comment initial Data: {
link: undefined,
mail: undefined,
nick: undefined,
pid: undefined,
rid: undefined,
ua: undefined,
url: undefined,
comment: undefined,
ip: '',
insertedAt: 2023-12-24T14:45:23.673Z,
user_id: '639ef5a05fee9f4325f95faf'
}
�[36m[2023-12-24T14:45:23.674] [8] [DEBUG]�[39m - Comment post hooks preSave done!
�[36m[2023-12-24T14:45:24.029] [8] [DEBUG]�[39m - Comment have been added to storage.
Error: Input data should be a String
at MarkdownIt.parse (/var/task/node_modules/markdown-it/lib/index.js:519:11)
at MarkdownIt.render (/var/task/node_modules/markdown-it/lib/index.js:544:36)
at /var/task/node_modules/@waline/vercel/src/service/markdown/index.js:61:43
at formatCmt (/var/task/node_modules/@waline/vercel/src/controller/comment.js:57:21)
at module.exports.postAction (/var/task/node_modules/@waline/vercel/src/controller/comment.js:239:23)
at cors (/var/task/node_modules/@koa/cors/index.js:108:16)
at /var/task/node_modules/@waline/vercel/src/middleware/version.js:5:3
at /var/task/node_modules/@waline/vercel/src/middleware/prefix-warning.js:27:3
at Server.<anonymous> (/var/task/___vc/__launcher/helpers-23SL6TQX.js:1:7826)
at Server.<anonymous> (/var/task/___vc/__launcher/bridge-server-PK2WV7I3.js:5:12379)
from waline.
查看Leancloud存储数据发现多个所有字段全部为undefined
的row,删除后管理后台可以正常取到数据
Checking the Leancloud storage data, we found multiple rows with all fields being undefined
. After deletion, the management backend can obtain the data normally
from waline.
了解,那应该就是空数据导致的 Markdown 渲染失败了,应该是非正常情况,先忽略吧,谢谢反馈。
Understood, it should be the Markdown rendering failure caused by empty data. It should be an abnormal situation. Ignore it for now. Thank you for your feedback.
from waline.
POST /comment?lang=en
该接口并未验证用户输入合法性,POST空json数据会返回
{"errno":500,"errmsg":"Input data should be a String"}
同时在数据库插入无效数据
POST /comment?lang=en
This interface does not verify the legitimacy of user input, and POST empty json data will be returned.
{"errno":500,"errmsg":"Input data should be a String"}
Insert invalid data into the database at the same time
from waline.
评论除了评论内容之外是可以都为空的,评论内容之前只做了前台的空判断,没有在服务端做处理,有需要的话欢迎 PR。
Comments can be empty except for the comment content. Before the comment content, only the front-end empty judgment was made, and there was no processing on the server side. If necessary, PR is welcome.
from waline.
Related Issues (20)
- [Bug]: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client HOT 2
- [Bug]: ArticleReaction.vue:99 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'reaction0') HOT 3
- [Bug]: Error when accessing UI management,TypeError: ww is not a function (admin:9118:162) HOT 2
- [Bug]: Got SyntaxError & ReferenceError when Importing waline.js v3 by CDN | 通过CDN导入waline.js v3时得到语法错误与引用错误 HOT 7
- [Feature]: GRAVATAR_STR SHA256 支持 || [Feature]: GRAVATAR_STR SHA256 support HOT 1
- [Bug]: Fail to deploy on Vercel - dist folder missing? HOT 6
- [Bug]: QQ邮件登陆后后台出现乱码,且发件退件 || [Bug]: After logging in to QQ mail, garbled characters appear in the background and the mail is returned. HOT 3
- [Bug] [独立部署 直接运行] [SQLite数据库] : 未配置LeanCloud相关的环境变量时, 程序运行报错 || [Bug] [Independent deployment, direct operation] [SQLite database]: When the environment variables related to LeanCloud are not configured, the program will report an error when running. HOT 4
- [Bug]: 评论未填邮件地址时,会报错 || [Bug]: When commenting without filling in the email address, an error will be reported HOT 1
- [Bug]: 发件人和收件人同一个邮箱? || [Bug]: The sender and recipient have the same email address? HOT 3
- [Feature]: 能支持从环境变量指定端口吗 || [Feature]: Can the port be specified from the environment variable? HOT 5
- [Bug]: WALINE将URL 中不带反斜杠/ 结尾和带反斜杠/ 结尾的地址会认为是两个页面 || [Bug]: WALINE will consider the URL without backslash/ at the end and the address with backslash/ at the end as two pages. HOT 2
- [Bug]: Cannot read properties of undefined (reading 'nick') HOT 9
- [Bug]: Prior submitted comment isn't clearing from comment form HOT 4
- [Feature]: RSS feeds for comments HOT 1
- [Bug]: 使用 zeabur 部署后评论/登录后台会提示:Not initialized HOT 7
- [Bug]: 最新版本评论数获取失败 || [Bug]: Failed to obtain the number of comments for the latest version HOT 17
- [Bug]: api return unexpected result to client HOT 2
- [Feature]: 建议加一个通知中心 || [Feature]: It is recommended to add a notification center
- [Feature]: 1. 建议把邮件提示这个功能做成可以在后台修改的样式 2. 优化一下图片上传 || [Feature]: 1. It is recommended that the email reminder function be made into a style that can be modified in the background 2. Optimize image uploading HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from waline.