Skip to content

Conversation

@ayu-v0
Copy link

@ayu-v0 ayu-v0 commented Nov 4, 2024

问题描述:当对执行器进行手动注册的时候,缺乏简单的HTTP地址合法校验,会导致后续事件调用的失败。
解决方案:先把url进行前后缀空格去除,然后把它变成小写,进行下一步验证。
验证思路(若url不含有http://,不含有https://,含有空格,则说明该url为不合法。)
if(!url.startsWith("http://") && !url.startsWith("https://") && url.contains(" ")){ return false; }
当然这里只是提供了较为简单的合法性校验,同时我觉得也是必要的,因为当用户进行手动注册时若没有符合相应规则,则对后续的调用失败。
如下为修改前后的图片信息:
XXL-JOB开源.docx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant