fix: 修复安全漏洞并清理死代码#15
Open
PrintNow wants to merge 1 commit into
Open
Conversation
安全修复: - HandleActionController: 添加 is_subclass_of 校验,防止任意类实例化 - RenderableController: 添加 LazyRenderable 接口校验,防止任意类实例化 - TinymceController: 添加路径遍历防护和磁盘白名单校验 代码清理: - EloquentRepository: 移除 Laravel 5.8 兼容代码,直接使用 getForeignKeyName()
331ba40 to
46faf27
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
is_subclass_of校验,防止任意类实例化LazyRenderable接口校验,防止任意类实例化变更文件
src/Http/Controllers/HandleActionController.phpsrc/Http/Controllers/RenderableController.phpsrc/Http/Controllers/TinymceController.phpsrc/Repositories/EloquentRepository.php安全详情
任意类实例化漏洞
风险:攻击者可通过
_action或renderable参数实例化服务器上的任意类,可能执行恶意代码。修复:
Dcat\Admin\Actions\ActionDcat\Admin\Contracts\LazyRenderable路径遍历漏洞
风险:攻击者可通过
dir参数访问服务器上的任意目录,通过disk参数访问任意存储磁盘。修复:
../、..\\、..)Test plan