-
Notifications
You must be signed in to change notification settings - Fork 5
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
fix PLCDirectory #60
fix PLCDirectory #60
Conversation
WalkthroughThe recent change in the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 2
@@ -19,8 +19,7 @@ class _PLCDirectory( | |||
return proceed { | |||
runBlocking { | |||
HttpRequest() | |||
.url(uri) | |||
.path(did) | |||
.url("$uri$did") |
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.
Ensure proper validation of URL parameters.
Direct concatenation of uri
and did
in .url("$uri$did")
may lead to security vulnerabilities if did
is not properly validated or sanitized. Consider adding checks or sanitization steps to ensure the did
parameter does not introduce risks such as open redirects or injection attacks.
@@ -33,8 +32,7 @@ class _PLCDirectory( | |||
return proceed { | |||
runBlocking { | |||
HttpRequest() | |||
.url(uri) | |||
.path("$did/log") | |||
.url("$uri$did/log") |
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.
Ensure proper validation of URL parameters.
The function .url("$uri$did/log")
uses direct concatenation of URL components. Similar to the DIDDetails
function, ensure that the did
parameter is properly validated or sanitized to prevent potential security risks.
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.
ありがとうございます、変更の際に確認できてなかったみたいです 🙏
HttpRequest は .url(uri).path(did) だと path が無視されてしまうので url に変更しました。
Summary by CodeRabbit