-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(connector): validate connector name before converting ssl certs #11939
fix(connector): validate connector name before converting ssl certs #11939
Conversation
9b18ac3
to
ad8a6a5
Compare
apps/emqx_bridge_azure_event_hub/test/emqx_bridge_azure_event_hub_producer_SUITE.erl
Outdated
Show resolved
Hide resolved
case Path of | ||
[?ROOT_KEY, _ConnectorType, ConnectorName] -> | ||
validate_connector_name(ConnectorName); | ||
_ -> |
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.
Is this something to expect? When? Otherwise, wouldn't it be better to just crash?
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.
True, I don't think this should be reached. I'll removed 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.
Actually, no, it may happen if someone does emqx_conf:update([connectors, type], ...)
. So better to just skip it, as we can't do validation in that case.
ad8a6a5
to
1ab970c
Compare
1ab970c
to
d6e9bbb
Compare
Fixes https://emqx.atlassian.net/browse/EMQX-11336
See also: #11540
Summary
馃 Generated by Copilot at d108dd2
This pull request adds a new feature to validate the bridge and connector names using a regular expression and fixes a bug in the V1 HTTP API for creating bridges with SSL options. It updates the schema, the
emqx_bridge
andemqx_connector
modules, and the corresponding test suites. It also adds new test cases for different bridge and connector types and configuration paths.PR Checklist
Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:
changes/(ce|ee)/(feat|perf|fix|breaking)-<PR-id>.en.md
filesChecklist for CI (.github/workflows) changes
changes/
dir for user-facing artifacts update