tduck-platform icon indicating copy to clipboard operation
tduck-platform copied to clipboard

A questionnaire system that can be privatized and deployed - 填鸭表单问卷系统(tduck-survey-form)

Results 20 tduck-platform issues
Sort by recently updated
recently updated
newest added

Bumps [fastjson](https://github.com/alibaba/fastjson) from 1.2.75 to 1.2.83. Release notes Sourced from fastjson's releases. FASTJSON 1.2.83版本发布(安全修复) 这是一个安全修复版本,修复最近收到在特定场景下可以绕过autoType关闭限制的漏洞,建议fastjson用户尽快采取安全措施保障系统安全。 安全修复方案 :https://github.com/alibaba/fastjson/wiki/security_update_20220523 Issues 安全加固 修复JDK17下setAccessible报错的问题 #4077 下载 https://repo1.maven.org/maven2/com/alibaba/fastjson/1.2.83/ 文档 https://github.com/alibaba/fastjson/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98 源码 https://github.com/alibaba/fastjson/tree/1.2.83 fastjson 1.2.79版本发布,BUG修复 这又是一个bug...

dependencies

本地部署测试也是不行

已填写完问卷后,如果有可以打印的功能,就完美了

建议大神把业务逻辑写service里,不然没有事务呢。

spring boot提示: s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped to org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController#errorHtml(HttpServletRequest, HttpServletResponse) 前台访问是404错误 curl访问,没有任何提示

更新mybatis plus 依赖版本 解决无法启动

## 1.Steps to reproduce (复现步骤) ### 1.Use the demo environment on the official website for authentication (`https://demo.tduckapp.com/project`) and register a user using the registration function ([email protected]/123456) (使用官网的demo环境进行验证(`https://demo.tduckapp.com/project`),使用注册功能注册一个用户([email protected]/123456)) ![image](https://github.com/TDuckCloud/tduck-platform/assets/18633010/5a08fe8c-52a7-4325-b0be-88202d457fa6) ### 2....

1. The code vulnerable to SQL injection is located as follows(com.tduck.cloud.form.service.data.FormDataMysqlService), This code directly concatenates SQL statements, leading to the SQL injection vulnerability ![1](https://github.com/TDuckCloud/tduck-platform/assets/103564508/99f5e3fa-422f-4122-b4fd-42544e605dbf) 2. Then, within the downloadFormResultFile method...

### 任意文件上传导致的xss ![image-20231018162118142](https://cdn.jsdelivr.net/gh/caibig/picture/img/ctf202310241516912.png) 根据经验和名字,这个类基本上就是一个通用类,统一作为文件上传功能的接口,如果能上传上去,可能会有执行权限的风险,在阅读了一部分的springboot的文档后发现如下 首先进入avatar函数,这个函数会接收名为file的数据并赋值到file中,文件类型是[[MultipartFile](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/multipart/MultipartFile.html)](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/multipart/MultipartFile.html),是springboot接受文件内容的类。 **随后进入37行,这里对目标path进行了赋值,问题也出在这里。file.getOriginalFilename()获取到我们上传文件的全部名称。FileUtil.extName,获取到了我们上传文件的后缀。使用随机值作为名字。赋值给了path。这里后缀我们可控。****也是这个漏洞的核心点** ``` String path = IdUtil.simpleUUID() + '.' + FileUtil.extName(file.getOriginalFilename()); ``` 接下来进入到处理文件的代码,38行。调用了OssStorageFactory.getStorageService()方法,我们进入这个方法中,简单判断下默认属性,进入到build()函数中,主要看build函数,点击跳进去。 ![image-20231018164409876](https://cdn.jsdelivr.net/gh/caibig/picture/img/ctf202310241516659.png) ![image-20231018171050980](https://cdn.jsdelivr.net/gh/caibig/picture/img/ctf202310241516666.png) 前面先对config进行了赋值,同时对上传文件的属性进行了判断,支持云上传。如果没有配置,那么直接进入后面的else判断。上传文件到本地。 首先进入44行,创建一个ApplicationHome类,给config分别赋值Domain和UploadFolder。随后创建一个LocalStorageService类并返回。随后回到最开始的OssStorageFactory.getStorageService().upload(file.getInputStream(), path),这里的LocalStorageService是OssStorageFactory的实现类,进入LocalStorageService的upload方法,如下所示: ![image-20231018172500597](https://cdn.jsdelivr.net/gh/caibig/picture/img/ctf202310241517343.png) 接收传过来的文件的流和path,23行对目标进行设置文件路径,以path结尾,这里path前面进行了名称重命名,所以无法进行目录穿越。但是文件这时已经传上去了,对后缀并未进行检测。随后返回数据。 至此,完成了文件上传,至于利用方式,当前只能传html,其他的不解析。 ### 默认账号密码登录 去看安装文档就能知道,我们是直接下载sql数据库进行网站的安装的。根据官网提示,也是让我们直接创建一个数据库,随后导入这个sql文件,进行网站的搭建的。 ![image-20231019151226008](https://cdn.jsdelivr.net/gh/caibig/picture/img/ctf202310241517811.png) 这里会默认创建两个账号,一个是[[email protected]](mailto:[email protected])...