Skip to content
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 AuthFilter crash if trusted network not configured #3110

Merged
merged 2 commits into from
Oct 13, 2022

Conversation

J-N-K
Copy link
Member

@J-N-K J-N-K commented Oct 11, 2022

Follow-up to #3106

See also: https://community.openhab.org/t/authfilter-has-arrayindexoutofboundexception/139866/7

The code did not properly handle an empty network. This also adds test for implicit user role handling and trusted networks.

@openhab/core-maintainers I beliebe this is critical as it breaks all installations until either this is merged or the user configures a trusted network (which should not be done in general).

Signed-off-by: Jan N. Klug github@klug.nrw

Signed-off-by: Jan N. Klug <github@klug.nrw>
@J-N-K J-N-K added the bug An unexpected problem or unintended behavior of the Core label Oct 11, 2022
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/authfilter-has-arrayindexoutofboundexception/139866/8

@J-N-K J-N-K marked this pull request as ready for review October 12, 2022 14:35
@J-N-K J-N-K requested a review from a team as a code owner October 12, 2022 14:35
Copy link
Member

@kaikreuzer kaikreuzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the fix and the additional tests.

Just a very minor comment below.

…b/core/io/rest/auth/internal/AuthFilter.java

Co-authored-by: Kai Kreuzer <kai@openhab.org>
Copy link
Member

@kaikreuzer kaikreuzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@kaikreuzer kaikreuzer merged commit ef3b13f into openhab:main Oct 13, 2022
@kaikreuzer kaikreuzer added this to the 3.4 milestone Oct 13, 2022
@J-N-K J-N-K deleted the bug-trustedbetworknotconfigured branch October 13, 2022 20:16
splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this pull request Jul 12, 2023
* Fix AuthFilter crash if trusted network not configured

Signed-off-by: Jan N. Klug <github@klug.nrw>
GitOrigin-RevId: ef3b13f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants