diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index aad2618b9..1c41b88b4 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -29,9 +29,9 @@ body: id: 'version' attributes: label: | - Version + Version description: | - What version(s) of Authelia can you reproduce this bug on? + What version(s) of Authelia can you reproduce this bug on? multiple: true options: - 'v4.37.5' @@ -76,9 +76,9 @@ body: id: 'deployment' attributes: label: | - Deployment Method + Deployment Method description: | - How are you deploying Authelia? + How are you deploying Authelia? options: - 'Docker' - 'Kubernetes' @@ -90,9 +90,9 @@ body: id: 'proxy' attributes: label: | - Reverse Proxy + Reverse Proxy description: | - What reverse proxy are you using? + What reverse proxy are you using? options: - 'Caddy' - 'Traefik' @@ -108,9 +108,9 @@ body: id: 'proxy-version' attributes: label: | - Reverse Proxy Version + Reverse Proxy Version description: | - What is the version of your reverse proxy? + What is the version of your reverse proxy? placeholder: 'x.x.x' validations: required: false @@ -118,36 +118,36 @@ body: id: 'description' attributes: label: | - Description + Description description: | - Describe the bug. + Describe the bug. validations: required: true - type: 'textarea' id: 'reproduction' attributes: label: | - Reproduction + Reproduction description: | - Describe how we can reproduce this issue. This should be step by step and should include detailed and specific information. Abstract or generic information should be avoided. For example this should include specific application names and versions if relevant. Reproducing the issue is important so we can verify it exists, add relevant tests, and verify it is solved. + Describe how we can reproduce this issue. This should be step by step and should include detailed and specific information. Abstract or generic information should be avoided. For example this should include specific application names and versions if relevant. Reproducing the issue is important so we can verify it exists, add relevant tests, and verify it is solved. validations: required: true - type: 'textarea' id: 'expectations' attributes: label: | - Expectations + Expectations description: | - Describe the desired or expected results. + Describe the desired or expected results. validations: required: false - type: 'textarea' id: 'configuration' attributes: label: | - Configuration (Authelia) + Configuration (Authelia) description: | - Provide a complete configuration file (the template will automatically put this content in a code block). + Provide a complete configuration file (the template will automatically put this content in a code block). render: 'yaml' validations: required: false @@ -155,7 +155,7 @@ body: id: 'logs' attributes: label: | - Logs (Authelia) + Logs (Authelia) description: | Provide complete logs with the log level set to debug or trace. Complete means from application start until the issue occurring. This is clearly explained in the [Logs](https://www.authelia.com/r/troubleshooting#logs) section of the troubleshooting guide. @@ -167,9 +167,9 @@ body: id: 'logs-other' attributes: label: | - Logs (Proxy / Application) + Logs (Proxy / Application) description: | - Provide complete debug logs for the affected proxy and/or application if available and relevant (the template will automatically put this content in a code block). + Provide complete debug logs for the affected proxy and/or application if available and relevant (the template will automatically put this content in a code block). render: 'shell' validations: required: false @@ -177,38 +177,38 @@ body: id: 'documentation' attributes: label: | - Documentation + Documentation description: | - Provide any relevant specification or other documentation if applicable. + Provide any relevant specification or other documentation if applicable. validations: required: false - type: 'checkboxes' id: 'checklist' attributes: label: | - Pre-Submission Checklist + Pre-Submission Checklist description: | - By submitting this issue confirm all of the following. + By submitting this issue confirm all of the following. options: - label: | - I agree to follow the [Code of Conduct](http://www.authelia.com/code-of-conduct) + I agree to follow the [Code of Conduct](http://www.authelia.com/code-of-conduct) required: true - label: | - This is a bug report and not a support request + This is a bug report and not a support request required: true - label: | - I have read the security policy and this bug report is not a security issue or security related issue + I have read the security policy and this bug report is not a security issue or security related issue required: true - label: | - I have either included the complete configuration file or I am sure it's unrelated to the configuration + I have either included the complete configuration file or I am sure it's unrelated to the configuration required: true - label: | - I have provided all of the required information in full with the only alteration being reasonable sanitization in accordance with the [Troubleshooting Sanitization](https://www.authelia.com/r/sanitize) reference guide + I have provided all of the required information in full with the only alteration being reasonable sanitization in accordance with the [Troubleshooting Sanitization](https://www.authelia.com/r/sanitize) reference guide required: true - label: | - I have checked for related proxy or application logs and included them if available + I have checked for related proxy or application logs and included them if available required: true - label: | - I have checked for related issues and checked the documentation + I have checked for related issues and checked the documentation required: true ... diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml index 4cd251a9a..6c3cb8092 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -20,50 +20,50 @@ body: id: 'description' attributes: label: | - Description + Description description: | - Describe the feature + Describe the feature validations: required: true - type: 'textarea' id: 'use-case' attributes: label: | - Use Case + Use Case description: | - Provide a use case + Provide a use case validations: required: true - type: 'textarea' id: 'details' attributes: label: | - Details + Details description: | - Describe the feature in detail + Describe the feature in detail validations: required: false - type: 'textarea' id: 'documentation' attributes: label: | - Documentation + Documentation description: | - Provide any relevant specification or other documentation if applicable + Provide any relevant specification or other documentation if applicable validations: required: false - type: 'checkboxes' id: 'checklist' attributes: label: | - Pre-Submission Checklist + Pre-Submission Checklist description: | - By submitting this issue confirm all of the following + By submitting this issue confirm all of the following options: - label: | - I agree to follow the [Code of Conduct](http://www.authelia.com/code-of-conduct) + I agree to follow the [Code of Conduct](http://www.authelia.com/code-of-conduct) required: true - label: | - I have checked for related issues and checked the documentation + I have checked for related issues and checked the documentation required: true ... diff --git a/cmd/authelia-gen/templates/github_issue_template_bug_report.yml.tmpl b/cmd/authelia-gen/templates/github_issue_template_bug_report.yml.tmpl index 7280b9f9d..0abfadde8 100644 --- a/cmd/authelia-gen/templates/github_issue_template_bug_report.yml.tmpl +++ b/cmd/authelia-gen/templates/github_issue_template_bug_report.yml.tmpl @@ -29,23 +29,23 @@ body: id: 'version' attributes: label: | - Version + Version description: | - What version(s) of Authelia can you reproduce this bug on? + What version(s) of Authelia can you reproduce this bug on? multiple: true options: {{- range .Versions }} - '{{ . }}' - {{- end }} + {{- end }} validations: required: true - type: 'dropdown' id: 'deployment' attributes: label: | - Deployment Method + Deployment Method description: | - How are you deploying Authelia? + How are you deploying Authelia? options: - 'Docker' - 'Kubernetes' @@ -57,9 +57,9 @@ body: id: 'proxy' attributes: label: | - Reverse Proxy + Reverse Proxy description: | - What reverse proxy are you using? + What reverse proxy are you using? options: {{- range .Proxies }} - '{{ . }}' @@ -70,9 +70,9 @@ body: id: 'proxy-version' attributes: label: | - Reverse Proxy Version + Reverse Proxy Version description: | - What is the version of your reverse proxy? + What is the version of your reverse proxy? placeholder: 'x.x.x' validations: required: false @@ -80,36 +80,36 @@ body: id: 'description' attributes: label: | - Description + Description description: | - Describe the bug. + Describe the bug. validations: required: true - type: 'textarea' id: 'reproduction' attributes: label: | - Reproduction + Reproduction description: | - Describe how we can reproduce this issue. This should be step by step and should include detailed and specific information. Abstract or generic information should be avoided. For example this should include specific application names and versions if relevant. Reproducing the issue is important so we can verify it exists, add relevant tests, and verify it is solved. + Describe how we can reproduce this issue. This should be step by step and should include detailed and specific information. Abstract or generic information should be avoided. For example this should include specific application names and versions if relevant. Reproducing the issue is important so we can verify it exists, add relevant tests, and verify it is solved. validations: required: true - type: 'textarea' id: 'expectations' attributes: label: | - Expectations + Expectations description: | - Describe the desired or expected results. + Describe the desired or expected results. validations: required: false - type: 'textarea' id: 'configuration' attributes: label: | - Configuration (Authelia) + Configuration (Authelia) description: | - Provide a complete configuration file (the template will automatically put this content in a code block). + Provide a complete configuration file (the template will automatically put this content in a code block). render: 'yaml' validations: required: false @@ -117,7 +117,7 @@ body: id: 'logs' attributes: label: | - Logs (Authelia) + Logs (Authelia) description: | Provide complete logs with the log level set to debug or trace. Complete means from application start until the issue occurring. This is clearly explained in the [Logs](https://www.authelia.com/r/troubleshooting#logs) section of the troubleshooting guide. @@ -129,9 +129,9 @@ body: id: 'logs-other' attributes: label: | - Logs (Proxy / Application) + Logs (Proxy / Application) description: | - Provide complete debug logs for the affected proxy and/or application if available and relevant (the template will automatically put this content in a code block). + Provide complete debug logs for the affected proxy and/or application if available and relevant (the template will automatically put this content in a code block). render: 'shell' validations: required: false @@ -139,38 +139,38 @@ body: id: 'documentation' attributes: label: | - Documentation + Documentation description: | - Provide any relevant specification or other documentation if applicable. + Provide any relevant specification or other documentation if applicable. validations: required: false - type: 'checkboxes' id: 'checklist' attributes: label: | - Pre-Submission Checklist + Pre-Submission Checklist description: | - By submitting this issue confirm all of the following. + By submitting this issue confirm all of the following. options: - label: | - I agree to follow the [Code of Conduct](http://www.authelia.com/code-of-conduct) + I agree to follow the [Code of Conduct](http://www.authelia.com/code-of-conduct) required: true - label: | - This is a bug report and not a support request + This is a bug report and not a support request required: true - label: | - I have read the security policy and this bug report is not a security issue or security related issue + I have read the security policy and this bug report is not a security issue or security related issue required: true - label: | - I have either included the complete configuration file or I am sure it's unrelated to the configuration + I have either included the complete configuration file or I am sure it's unrelated to the configuration required: true - label: | - I have provided all of the required information in full with the only alteration being reasonable sanitization in accordance with the [Troubleshooting Sanitization](https://www.authelia.com/r/sanitize) reference guide + I have provided all of the required information in full with the only alteration being reasonable sanitization in accordance with the [Troubleshooting Sanitization](https://www.authelia.com/r/sanitize) reference guide required: true - label: | - I have checked for related proxy or application logs and included them if available + I have checked for related proxy or application logs and included them if available required: true - label: | - I have checked for related issues and checked the documentation + I have checked for related issues and checked the documentation required: true ... diff --git a/cmd/authelia-gen/templates/github_issue_template_feature.yml.tmpl b/cmd/authelia-gen/templates/github_issue_template_feature.yml.tmpl index 04d733f8d..8d40c0305 100644 --- a/cmd/authelia-gen/templates/github_issue_template_feature.yml.tmpl +++ b/cmd/authelia-gen/templates/github_issue_template_feature.yml.tmpl @@ -20,50 +20,50 @@ body: id: 'description' attributes: label: | - Description + Description description: | - Describe the feature + Describe the feature validations: required: true - type: 'textarea' id: 'use-case' attributes: label: | - Use Case + Use Case description: | - Provide a use case + Provide a use case validations: required: true - type: 'textarea' id: 'details' attributes: label: | - Details + Details description: | - Describe the feature in detail + Describe the feature in detail validations: required: false - type: 'textarea' id: 'documentation' attributes: label: | - Documentation + Documentation description: | - Provide any relevant specification or other documentation if applicable + Provide any relevant specification or other documentation if applicable validations: required: false - type: 'checkboxes' id: 'checklist' attributes: label: | - Pre-Submission Checklist + Pre-Submission Checklist description: | - By submitting this issue confirm all of the following + By submitting this issue confirm all of the following options: - label: | - I agree to follow the [Code of Conduct](http://www.authelia.com/code-of-conduct) + I agree to follow the [Code of Conduct](http://www.authelia.com/code-of-conduct) required: true - label: | - I have checked for related issues and checked the documentation + I have checked for related issues and checked the documentation required: true ... diff --git a/internal/configuration/schema/types_address.go b/internal/configuration/schema/types_address.go index 702133382..95005de38 100644 --- a/internal/configuration/schema/types_address.go +++ b/internal/configuration/schema/types_address.go @@ -6,7 +6,6 @@ import ( "net/url" "strconv" "strings" - "syscall" ) // NewAddress returns an *Address and error depending on the ability to parse the string as an Address. @@ -381,25 +380,6 @@ func (a *Address) NetworkAddress() string { return a.url.Host } -// Listener creates and returns a net.Listener. -func (a *Address) Listener() (ln net.Listener, err error) { - if a.url == nil { - return nil, fmt.Errorf("address url is nil") - } - - if a.socket && a.umask != -1 { - umask := syscall.Umask(a.umask) - - ln, err = net.Listen(a.Network(), a.NetworkAddress()) - - _ = syscall.Umask(umask) - - return ln, err - } - - return net.Listen(a.Network(), a.NetworkAddress()) -} - // Dial creates and returns a dialed net.Conn. func (a *Address) Dial() (net.Conn, error) { if !a.valid || a.url == nil { diff --git a/internal/configuration/schema/types_addresses_nix.go b/internal/configuration/schema/types_addresses_nix.go new file mode 100644 index 000000000..aeee2fbd1 --- /dev/null +++ b/internal/configuration/schema/types_addresses_nix.go @@ -0,0 +1,28 @@ +//go:build linux || freebsd || darwin || netbsd || solaris + +package schema + +import ( + "fmt" + "net" + "syscall" +) + +// Listener creates and returns a net.Listener. +func (a *Address) Listener() (ln net.Listener, err error) { + if a.url == nil { + return nil, fmt.Errorf("address url is nil") + } + + if a.socket && a.umask != -1 { + umask := syscall.Umask(a.umask) + + ln, err = net.Listen(a.Network(), a.NetworkAddress()) + + _ = syscall.Umask(umask) + + return ln, err + } + + return net.Listen(a.Network(), a.NetworkAddress()) +} diff --git a/internal/configuration/schema/types_addresses_non_nix.go b/internal/configuration/schema/types_addresses_non_nix.go new file mode 100644 index 000000000..bd7d3aa60 --- /dev/null +++ b/internal/configuration/schema/types_addresses_non_nix.go @@ -0,0 +1,17 @@ +//go:build !linux && !freebsd && !darwin && !netbsd && !solaris + +package schema + +import ( + "fmt" + "net" +) + +// Listener creates and returns a net.Listener. +func (a *Address) Listener() (ln net.Listener, err error) { + if a.url == nil { + return nil, fmt.Errorf("address url is nil") + } + + return net.Listen(a.Network(), a.NetworkAddress()) +}