Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GETS/HEADS/PUT/DELETE 不允许前端传 @combine #494

Merged
merged 2 commits into from
Jan 9, 2023

Conversation

cloudAndMonkey
Copy link
Contributor

#493
GETS/HEADS/PUT/DELETE 不允许前端传 @combine,目前在这里去掉了校验,需要在 AbstractVerifier 补上,这样就只能通过后端配置 @combine 了,既保证了功能,又保证了安全

Tencent#493
GETS/HEADS/PUT/DELETE 不允许前端传 @combine,目前在这里去掉了校验,需要在 AbstractVerifier 补上,这样就只能通过后端配置 @combine 了,既保证了功能,又保证了安全
@TommyLemon
Copy link
Collaborator

TommyLemon commented Jan 9, 2023

@cloudAndMonkey 这里少了 PUT 哈

if (combine != null && (_method == RequestMethod.DELETE || _method == RequestMethod.GETS || _method == RequestMethod.HEADS))

可以直接用 RequestMethod.isQueryMehtod(_method) == false 判断,
还可以在 RequestMethod 新增一个 isUpdateMehtod,返回值是 ! isQueryMehtod

@cloudAndMonkey
Copy link
Contributor Author

cloudAndMonkey commented Jan 9, 2023

@TommyLemon
用RequestMethod.isPublicMethod(_method) == false 判断即可
image

@TommyLemon TommyLemon merged commit fb3fa39 into Tencent:master Jan 9, 2023
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.

2 participants