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(configuration): missing trailing slash #6968
Conversation
ArtifactsThese changes are published for testing on Buildkite, DockerHub and GitHub Container Registry. Docker Container
|
WalkthroughThe changes involve enhancing the handling of URLs in session cookie configurations within a security framework. A switch statement has been added to ensure that Changes
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 (
|
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.
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.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files selected for processing (2)
- internal/configuration/validator/session.go (2 hunks)
- internal/configuration/validator/session_test.go (1 hunks)
Additional comments: 2
internal/configuration/validator/session.go (1)
- 219-219: The update to
config.Cookies[i]
with the modifiedd
object is correctly placed to ensure that any changes made to theAutheliaURL.Path
are saved back to the main configuration object. This is a crucial step to ensure that the validation changes are not lost.internal/configuration/validator/session_test.go (1)
- 896-897: The updated test cases in
TestShouldRaiseErrorWhenPortalURLIsInvalid
correctly reflect the new expectation of a trailing slash in the URL values being checked. This ensures that the unit tests are aligned with the updated validation logic in the main codebase.
The trailing slash in the Authelia URL when missing in the path can cause situations where a user can provide an invalid configuration and not be aware which can be rather difficult to diagnose. This fixes that issue by ensuring if there is a path that it ends with a '/'. Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
44d0508
to
f829ed3
Compare
✅ Deploy Preview for authelia-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (3)
- .yamllint.yml (1 hunks)
- internal/configuration/validator/session.go (2 hunks)
- internal/configuration/validator/session_test.go (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- internal/configuration/validator/session.go
- internal/configuration/validator/session_test.go
Additional comments: 1
.yamllint.yml (1)
- 20-20: The addition of
internal/suites/
to the ignore list in.yamllint.yml
is noted.Please ensure that excluding this directory from YAML linting aligns with the project's standards and does not inadvertently skip important linting checks for new or existing YAML files within
internal/suites/
.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6968 +/- ##
==========================================
+ Coverage 73.37% 73.39% +0.01%
==========================================
Files 345 345
Lines 29716 29724 +8
Branches 839 839
==========================================
+ Hits 21804 21815 +11
+ Misses 7041 7038 -3
Partials 871 871
Flags with carried forward coverage won't be shown. Click here to find out more.
|
The trailing slash in the Authelia URL when missing in the path can cause situations where a user can provide an invalid configuration and not be aware which can be rather difficult to diagnose. This fixes that issue by ensuring if there is a path that it ends with a '/'.
Summary by CodeRabbit
internal/suites/
directory in the.yamllint.yml
configuration file.