-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 code scanning alert no. 456: Incomplete string escaping or encoding #193909
Conversation
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
💛 Build succeeded, but was flaky
Failed CI StepsTest FailuresMetrics [docs]Async chunks
To update your PR or re-run it, just comment with: |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
1 similar comment
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
1 similar comment
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
10 similar comments
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
6 similar comments
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
…ng (elastic#193909) Fixes [https://github.com/elastic/kibana/security/code-scanning/456](https://github.com/elastic/kibana/security/code-scanning/456) To fix the problem, we need to ensure that backslashes are also escaped in the `value` string. This can be done by first replacing backslashes with double backslashes and then replacing double quotes with escaped double quotes. This ensures that all occurrences of backslashes and double quotes are properly escaped. - Modify the `value.replace` call to first escape backslashes and then escape double quotes. - The changes will be made in the `createFilterFromOptions` function, specifically on line 128. _Suggested fixes powered by Copilot Autofix. Review carefully before merging._ Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> (cherry picked from commit 7458ff1) # Conflicts: # x-pack/plugins/observability_solution/infra/public/pages/metrics/metrics_explorer/components/helpers/create_tsvb_link.ts
…ng (elastic#193909) Fixes [https://github.com/elastic/kibana/security/code-scanning/456](https://github.com/elastic/kibana/security/code-scanning/456) To fix the problem, we need to ensure that backslashes are also escaped in the `value` string. This can be done by first replacing backslashes with double backslashes and then replacing double quotes with escaped double quotes. This ensures that all occurrences of backslashes and double quotes are properly escaped. - Modify the `value.replace` call to first escape backslashes and then escape double quotes. - The changes will be made in the `createFilterFromOptions` function, specifically on line 128. _Suggested fixes powered by Copilot Autofix. Review carefully before merging._ Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> (cherry picked from commit 7458ff1) # Conflicts: # x-pack/plugins/observability_solution/infra/public/pages/metrics/metrics_explorer/components/helpers/create_tsvb_link.ts
…ng (elastic#193909) Fixes [https://github.com/elastic/kibana/security/code-scanning/456](https://github.com/elastic/kibana/security/code-scanning/456) To fix the problem, we need to ensure that backslashes are also escaped in the `value` string. This can be done by first replacing backslashes with double backslashes and then replacing double quotes with escaped double quotes. This ensures that all occurrences of backslashes and double quotes are properly escaped. - Modify the `value.replace` call to first escape backslashes and then escape double quotes. - The changes will be made in the `createFilterFromOptions` function, specifically on line 128. _Suggested fixes powered by Copilot Autofix. Review carefully before merging._ Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> (cherry picked from commit 7458ff1) # Conflicts: # x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_tsvb_link.ts
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
…encoding (#193909) (#198241) # Backport This will backport the following commits from `main` to `8.x`: - Fix code scanning alert no. 456: Incomplete string escaping or encoding (#193909) (7458ff1) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Nathan L Smith","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-25T21:30:52Z","message":"Fix code scanning alert no. 456: Incomplete string escaping or encoding (#193909)\n\nFixes\r\n[https://github.com/elastic/kibana/security/code-scanning/456](https://github.com/elastic/kibana/security/code-scanning/456)\r\n\r\nTo fix the problem, we need to ensure that backslashes are also escaped\r\nin the `value` string. This can be done by first replacing backslashes\r\nwith double backslashes and then replacing double quotes with escaped\r\ndouble quotes. This ensures that all occurrences of backslashes and\r\ndouble quotes are properly escaped.\r\n\r\n- Modify the `value.replace` call to first escape backslashes and then\r\nescape double quotes.\r\n- The changes will be made in the `createFilterFromOptions` function,\r\nspecifically on line 128.\r\n\r\n\r\n_Suggested fixes powered by Copilot Autofix. Review carefully before\r\nmerging._\r\n\r\nCo-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>","sha":"7458ff11174fe184afe4ec93c858f89063296abe"},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[]}] BACKPORT-->
… encoding (#193909) (#198242) # Backport This will backport the following commits from `main` to `8.16`: - Fix code scanning alert no. 456: Incomplete string escaping or encoding (#193909) (7458ff1) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Nathan L Smith","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-25T21:30:52Z","message":"Fix code scanning alert no. 456: Incomplete string escaping or encoding (#193909)\n\nFixes\r\n[https://github.com/elastic/kibana/security/code-scanning/456](https://github.com/elastic/kibana/security/code-scanning/456)\r\n\r\nTo fix the problem, we need to ensure that backslashes are also escaped\r\nin the `value` string. This can be done by first replacing backslashes\r\nwith double backslashes and then replacing double quotes with escaped\r\ndouble quotes. This ensures that all occurrences of backslashes and\r\ndouble quotes are properly escaped.\r\n\r\n- Modify the `value.replace` call to first escape backslashes and then\r\nescape double quotes.\r\n- The changes will be made in the `createFilterFromOptions` function,\r\nspecifically on line 128.\r\n\r\n\r\n_Suggested fixes powered by Copilot Autofix. Review carefully before\r\nmerging._\r\n\r\nCo-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>","sha":"7458ff11174fe184afe4ec93c858f89063296abe"},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[]}] BACKPORT-->
… encoding (#193909) (#198243) # Backport This will backport the following commits from `main` to `7.17`: - Fix code scanning alert no. 456: Incomplete string escaping or encoding (#193909) (7458ff1) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Nathan L Smith","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-25T21:30:52Z","message":"Fix code scanning alert no. 456: Incomplete string escaping or encoding (#193909)\n\nFixes\r\n[https://github.com/elastic/kibana/security/code-scanning/456](https://github.com/elastic/kibana/security/code-scanning/456)\r\n\r\nTo fix the problem, we need to ensure that backslashes are also escaped\r\nin the `value` string. This can be done by first replacing backslashes\r\nwith double backslashes and then replacing double quotes with escaped\r\ndouble quotes. This ensures that all occurrences of backslashes and\r\ndouble quotes are properly escaped.\r\n\r\n- Modify the `value.replace` call to first escape backslashes and then\r\nescape double quotes.\r\n- The changes will be made in the `createFilterFromOptions` function,\r\nspecifically on line 128.\r\n\r\n\r\n_Suggested fixes powered by Copilot Autofix. Review carefully before\r\nmerging._\r\n\r\nCo-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>","sha":"7458ff11174fe184afe4ec93c858f89063296abe"},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[]}] BACKPORT-->
Fixes https://github.com/elastic/kibana/security/code-scanning/456
To fix the problem, we need to ensure that backslashes are also escaped in the
value
string. This can be done by first replacing backslashes with double backslashes and then replacing double quotes with escaped double quotes. This ensures that all occurrences of backslashes and double quotes are properly escaped.value.replace
call to first escape backslashes and then escape double quotes.createFilterFromOptions
function, specifically on line 128.Suggested fixes powered by Copilot Autofix. Review carefully before merging.