Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…#176323) # Backport This will backport the following commits from `main` to `8.12`: - [[Fleet] Logstash Output - being compliant to RFC-952 (#176298)](#176298) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Alex S","email":"Terilia@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-02-06T16:33:56Z","message":"[Fleet] Logstash Output - being compliant to RFC-952 (#176298)\n\n## Summary\r\n\r\nThe logstash output in fleet was not following the\r\n[RFC-952](https://www.rfc-editor.org/rfc/rfc952) correctly, only\r\naccepting lowercase url's for the hostname, even though according to the\r\nstandard, this should be irrelevant.\r\n\r\nAdditionally added two new unit tests, to check that this behaviour is\r\ncompliant in the future as well.\r\n\r\n\r\n## Fix explanation\r\n\r\nThe issue was in the past that the URL Type in nodejs is automatically\r\nlowercase, and then the value of the form is or the string provided is\r\nchecked against this url type. The types behaviour is explained here:\r\nhttps://nodejs.org/api/url.html#the-whatwg-url-api\r\n\r\nAs we would like to be case insensitive, in the check, the value is also\r\nlowerecased with: val.toLowerCase() to pass the check\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [X] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"55429179ba30ca3a922f6daf44ce17f8d5f19507","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Fleet","backport:prev-minor","v8.13.0"],"title":"[Fleet] Logstash Output - being compliant to RFC-952","number":176298,"url":"https://github.com/elastic/kibana/pull/176298","mergeCommit":{"message":"[Fleet] Logstash Output - being compliant to RFC-952 (#176298)\n\n## Summary\r\n\r\nThe logstash output in fleet was not following the\r\n[RFC-952](https://www.rfc-editor.org/rfc/rfc952) correctly, only\r\naccepting lowercase url's for the hostname, even though according to the\r\nstandard, this should be irrelevant.\r\n\r\nAdditionally added two new unit tests, to check that this behaviour is\r\ncompliant in the future as well.\r\n\r\n\r\n## Fix explanation\r\n\r\nThe issue was in the past that the URL Type in nodejs is automatically\r\nlowercase, and then the value of the form is or the string provided is\r\nchecked against this url type. The types behaviour is explained here:\r\nhttps://nodejs.org/api/url.html#the-whatwg-url-api\r\n\r\nAs we would like to be case insensitive, in the check, the value is also\r\nlowerecased with: val.toLowerCase() to pass the check\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [X] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"55429179ba30ca3a922f6daf44ce17f8d5f19507"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.13.0","branchLabelMappingKey":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/176298","number":176298,"mergeCommit":{"message":"[Fleet] Logstash Output - being compliant to RFC-952 (#176298)\n\n## Summary\r\n\r\nThe logstash output in fleet was not following the\r\n[RFC-952](https://www.rfc-editor.org/rfc/rfc952) correctly, only\r\naccepting lowercase url's for the hostname, even though according to the\r\nstandard, this should be irrelevant.\r\n\r\nAdditionally added two new unit tests, to check that this behaviour is\r\ncompliant in the future as well.\r\n\r\n\r\n## Fix explanation\r\n\r\nThe issue was in the past that the URL Type in nodejs is automatically\r\nlowercase, and then the value of the form is or the string provided is\r\nchecked against this url type. The types behaviour is explained here:\r\nhttps://nodejs.org/api/url.html#the-whatwg-url-api\r\n\r\nAs we would like to be case insensitive, in the check, the value is also\r\nlowerecased with: val.toLowerCase() to pass the check\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [X] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"55429179ba30ca3a922f6daf44ce17f8d5f19507"}}]}] BACKPORT--> Co-authored-by: Alex S <Terilia@users.noreply.github.com>
- Loading branch information