mkild / dental-admin-api Goto Github PK
View Code? Open in Web Editor NEW基于Node.js koa2 的 牙科诊所管理系统 API | Dental Admin API based on koa2
License: GNU Affero General Public License v3.0
基于Node.js koa2 的 牙科诊所管理系统 API | Dental Admin API based on koa2
License: GNU Affero General Public License v3.0
检测到 Mkild/dental-admin-api 一共引入了483个开源组件,存在9个漏洞
漏洞标题:nodejs ejs远程代码执行漏洞
缺陷组件:[email protected]
漏洞编号:CVE-2017-1000228
漏洞描述:nodejs ejs是一款嵌入式JavaScript模板,它具有流量控制、自定义分隔符和转义输出等功能。
nodejs ejs 2.5.3之前的版本中的‘ejs.renderFile()’函数存在远程代码执行漏洞,该漏洞源于较弱的输入验证。远程攻击者可利用该漏洞执行代码。
国家漏洞库信息:https://www.cnvd.org.cn/flaw/show/CNVD-2017-36621
影响范围:(∞, 2.5.3)
最小修复版本:2.5.3
缺陷组件引入路径:[email protected]>[email protected]
另外还有9个漏洞,详细报告:https://mofeisec.com/jr?p=a1c537
Ignoring invalid configuration option passed to Connection: collate. This is currently a warning, but in future versions of MySQL2, an error will be thrown if
you pass an invalid configuration option to a Connection
Ignoring invalid configuration option passed to Connection: collate. This is currently a warning, but in future versions of MySQL2, an error will be thrown if
you pass an invalid configuration option to a Connection
Ignoring invalid configuration option passed to Connection: collate. This is currently a warning, but in future versions of MySQL2, an error will be thrown if
you pass an invalid configuration option to a Connection
Ignoring invalid configuration option passed to Connection: collate. This is currently a warning, but in future versions of MySQL2, an error will be thrown if
you pass an invalid configuration option to a Connection
Ignoring invalid configuration option passed to Connection: collate. This is currently a warning, but in future versions of MySQL2, an error will be thrown if
you pass an invalid configuration option to a Connection
Ignoring invalid configuration option passed to Connection: collate. This is currently a warning, but in future versions of MySQL2, an error will be thrown if
you pass an invalid configuration option to a Connection
Executing (default): CREATE TABLE IF NOT EXISTS `user` (`id` INTEGER NOT NULL auto_increment , `username` VARCHAR(255) NOT NULL UNIQUE, `password` VARCHAR(255) NOT NULL, `salt` VARCHAR(255) NOT NULL, `state` TINYINT(1) NOT NULL, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB;
Executing (default): CREATE TABLE IF NOT EXISTS `user_role` (`id` INTEGER NOT NULL auto_increment , `username` VARCHAR(255) NOT NULL, `role_id` INTEGER NOT NULL, PRIMARY KEY (`id`), FOREIGN KEY (`username`) REFERENCES `user` (`username`) ON DELETE CASCADE ON UPDATE CASCADE, FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE) ENGINE=InnoDB;
Executing (default): CREATE TABLE IF NOT EXISTS `role` (`id` INTEGER NOT NULL auto_increment , `rolename` VARCHAR(255) NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB;
Executing (default): CREATE TABLE IF NOT EXISTS `user_detail` (`id` INTEGER NOT NULL auto_increment , `name` VARCHAR(255), `username` VARCHAR(255) NOT NULL, `gender` VARCHAR(255), `phone` VARCHAR(255), `email` VARCHAR(255), PRIMARY KEY (`id`), FOREIGN KEY (`username`) REFERENCES `user` (`username`) ON DELETE CASCADE
ON UPDATE CASCADE) ENGINE=InnoDB;
Executing (default): CREATE TABLE IF NOT EXISTS `notice` (`id` INTEGER NOT NULL auto_increment , `title` VARCHAR(255) NOT NULL, `author` VARCHAR(255) NOT NULL, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, PRIMARY KEY (`id`), FOREIGN KEY (`author`) REFERENCES `user` (`username`) ON DELETE NO ACTION ON UPDATE CASCADE) ENGINE=InnoDB;
Executing (default): CREATE TABLE IF NOT EXISTS `notice_text` (`id` INTEGER NOT NULL auto_increment , `notice_id` INTEGER NOT NULL, `text` TEXT NOT NULL, PRIMARY KEY (`id`), FOREIGN KEY (`notice_id`) REFERENCES `notice` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE=InnoDB;
Executing (default): CREATE TABLE IF NOT EXISTS `department` (`id` INTEGER NOT NULL auto_increment , `name` VARCHAR(255) NOT NULL UNIQUE, `director` VARCHAR(255) NOT NULL, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB;
C:\Users\Desktop\dental-admin-api-master\node_modules\sequelize\lib\dialects\mysql\query.js:239
return new sequelizeErrors.DatabaseError(err);
^
at Socket.emit (node:events:526:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
code: 'ER_FK_CANNOT_OPEN_PARENT',
errno: 1824,
sqlState: 'HY000',
sqlMessage: "Failed to open the referenced table 'role'",
sql: 'CREATE TABLE IF NOT EXISTS `user_role` (`id` INTEGER NOT NULL auto_increment , `username` VARCHAR(255) NOT NULL, `role_id` INTEGER NOT NULL, PRIMARY
KEY (`id`), FOREIGN KEY (`username`) REFERENCES `user` (`username`) ON DELETE CASCADE ON UPDATE CASCADE, FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE) ENGINE=InnoDB;',
parameters: undefined
},
original: Error: Failed to open the referenced table 'role'
at Socket.emit (node:events:526:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
code: 'ER_FK_CANNOT_OPEN_PARENT',
errno: 1824,
sqlState: 'HY000',
sqlMessage: "Failed to open the referenced table 'role'",
sql: 'CREATE TABLE IF NOT EXISTS `user_role` (`id` INTEGER NOT NULL auto_increment , `username` VARCHAR(255) NOT NULL, `role_id` INTEGER NOT NULL, PRIMARY
KEY (`id`), FOREIGN KEY (`username`) REFERENCES `user` (`username`) ON DELETE CASCADE ON UPDATE CASCADE, FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE) ENGINE=InnoDB;',
parameters: undefined
},
sql: 'CREATE TABLE IF NOT EXISTS `user_role` (`id` INTEGER NOT NULL auto_increment , `username` VARCHAR(255) NOT NULL, `role_id` INTEGER NOT NULL, PRIMARY KEY (`id`), FOREIGN KEY (`username`) REFERENCES `user` (`username`) ON DELETE CASCADE ON UPDATE CASCADE, FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE) ENGINE=InnoDB;',
parameters: undefined
}
错误有两处:
1、建表recorde时,引用department表中dp作为外键时,会出现无法引用的问题,看了一下是因为dp不是pk而且不是unique,修改之后好了。
2、如上面的error log,role表无法引用,但是在日志里可以看到role已经顺利建表了,我尝试直接在myusql workbench中运行代码CREATE TABLE IF NOT EXISTS `user_role` (`id` INTEGER NOT NULL auto_increment , `username` VARCHAR(255) NOT NULL, `role_id` INTEGER NOT NULL, PRIMARY KEY (`id`), FOREIGN KEY (`username`) REFERENCES `user` (`username`) ON DELETE CASCADE ON UPDATE CASCADE, FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE) ENGINE=InnoDB;
,意外好用,但仍不知道为啥。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.