-
Notifications
You must be signed in to change notification settings - Fork 153
fix: enable to use secrets with special characters #961
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: enable to use secrets with special characters #961
Conversation
|
Hi @mpatlasov. Thanks for your PR. I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
a118c24 to
a700858
Compare
andyzhangx
left a comment
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.
/ok-to-test
|
btw, sanity tests all failed with this PR: https://prow.k8s.io/view/gs/kubernetes-ci-logs/pr-logs/pull/kubernetes-csi_csi-driver-smb/961/pull-csi-driver-smb-sanity/1938798037342097408 |
Pull Request Test Coverage Report for Build 16896083151Details
💛 - Coveralls |
a700858 to
d605781
Compare
If the password to SMB-server contained special characters (e.g. "foo,bar"), the mount failed. Now, when the password is passed to mount via "credentials=filename" option, then mount succeeds.
d605781 to
0cbf17f
Compare
|
/test pull-csi-driver-smb-e2e-windows-2022 |
|
@andyzhangx , I addressed your comments (and fixed test failures). Please take a look again. |
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.
Pull Request Overview
This PR fixes a bug where SMB volume mounting fails when passwords contain special characters like commas, quotes, or backticks. The solution switches from passing credentials directly in the mount command line to writing them to a temporary credentials file when special characters are detected.
- Adds detection for special characters in passwords that could break mount command parsing
- Implements credentials file approach as fallback when special characters are present
- Modifies mount options format to support both direct and file-based credential passing
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| pkg/smb/smb_common_linux.go | Adds credential file creation logic and special character detection for mount options |
| pkg/smb/nodeserver.go | Adds special character detection function and modifies credential formatting based on character presence |
andyzhangx
left a comment
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.
thanks, it lgtm in general now.
|
Hey @andyzhangx , I made three changes in a new commit:
|
a03aa0d to
5d48318
Compare
|
/retest |
1 similar comment
|
/retest |
andyzhangx
left a comment
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.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andyzhangx, mpatlasov The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
If the password to SMB-server contained special characters (e.g. "foo,bar"), the mount failed. Now, when the password is passed to mount via "credentials=filename" option, then mount succeeds.
/kind bug
Fixes #507, #358, #573
Release note: