-
Notifications
You must be signed in to change notification settings - Fork 66
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
validate the request before processing the body #578
Conversation
🎉 Thank you for your code contribution! To guarantee the change/addition is conformant to the OCF Specification, we would like to ask you to execute OCF Conformance Testing of your change ☝️ when your work is ready to be reviewed. ℹ️ To verify your latest change (663ab61), label this PR with |
012dac3
to
cf0defb
Compare
cf0defb
to
1037096
Compare
1053ee3
to
80ee099
Compare
80ee099
to
793fa92
Compare
acc7b0f
to
cd0d2a3
Compare
69e81fc
to
2ded549
Compare
a9f5f41
to
c788bd4
Compare
c788bd4
to
7d8eef7
Compare
7d8eef7
to
2ed3476
Compare
api/oc_ri_internal.h
Outdated
|
||
/** @brief Validate a coap request. When fails it will set error message for the | ||
* peer. This function doesn't validate body content. */ | ||
bool oc_ri_validate_coap_request(coap_make_response_ctx_t *ctx, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cannot the ctx
parameter be made const
? Seems weird that a validation function would modify it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I renamed it to oc_ri_parse_coap_request_header
messaging/coap/engine_internal.h
Outdated
oc_endpoint_t *, void *); | ||
const oc_endpoint_t *, void *); | ||
|
||
typedef bool (*coap_validate_request_fn_t)(coap_make_response_ctx_t *, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const coap_make_response_ctx_t *
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed coap_validate_request_fn_t
-> coap_parse_request_header_fn_t
4b098ae
to
d85704a
Compare
d85704a
to
a87ddd6
Compare
Quality Gate passedThe SonarCloud Quality Gate passed, but some issues were introduced. 1 New issue |
No description provided.