-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: Support symlinks in ca-certs
folder
#32391
Conversation
WalkthroughWalkthroughThe modification in the Changes
Possibly related issues
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 (
|
@@ -319,7 +319,7 @@ setup-custom-ca-certificates() ( | |||
-deststorepass changeit | |||
|
|||
# Add the custom CA certificates to the store. | |||
find "$stacks_ca_certs_path" -maxdepth 1 -type f -name '*.crt' \ | |||
find -L "$stacks_ca_certs_path" -maxdepth 1 -type f -name '*.crt' \ |
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.
Consider quoting the {}
placeholder in the find
command to prevent word splitting.
- -exec keytool -import -alias '{}' -noprompt -keystore "$store" -file '{}' -storepass changeit ';'
+ -exec keytool -import -alias '{}' -noprompt -keystore "$store" -file '{}' -storepass changeit ';'
While this specific usage might not directly lead to issues, consistently quoting placeholders is a good practice to prevent unexpected behavior in scripts.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
find -L "$stacks_ca_certs_path" -maxdepth 1 -type f -name '*.crt' \ | |
find -L "$stacks_ca_certs_path" -maxdepth 1 -type f -name '*.crt' \ |
-deststorepass changeit | ||
|
||
# Add the custom CA certificates to the store. | ||
find "$stacks_ca_certs_path" -maxdepth 1 -type f -name '*.crt' \ | ||
find -L "$stacks_ca_certs_path" -maxdepth 1 -type f -name '*.crt' \ | ||
-print \ | ||
-exec keytool -import -alias '{}' -noprompt -keystore "$store" -file '{}' -storepass changeit ';' | ||
|
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.
📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [62-62]
Use -n
instead of ! -z
for string non-empty check for better readability.
- if [[ ! -z ${APPSMITH_SEGMENT_CE_KEY-} ]]; then
+ if [[ -n ${APPSMITH_SEGMENT_CE_KEY-} ]]; then
📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [81-81]
Declare and assign separately to avoid masking return values. This ensures that the return value of the command is not inadvertently masked by the assignment operation.
- FILESTORE_IP_ADDRESS="$(echo "$FILESTORE_IP_ADDRESS" | xargs)"
+ FILESTORE_IP_ADDRESS=$(echo "$FILESTORE_IP_ADDRESS" | xargs)
- FILE_SHARE_NAME="$(echo "$FILE_SHARE_NAME" | xargs)"
+ FILE_SHARE_NAME=$(echo "$FILE_SHARE_NAME" | xargs)
Apply this change to all similar instances in the script.
Also applies to: 85-85, 89-89, 93-93
📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [457-457]
Double quote the variable to prevent globbing and word splitting.
- cp -v "$1" "$MONGODB_TMP_KEY_PATH"
+ cp -v "$1" "$MONGODB_TMP_KEY_PATH"
This change ensures that the script behaves as expected even if the variable contains spaces or glob characters.
ca-certs
folder
/build-deploy-preview skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/8549563701. |
Deploy-Preview-URL: https://ce-32391.dp.appsmith.com |
Fixes: 30928
Summary by CodeRabbit