Bug 2017411
Summary: | cockpit crashes because invalid SASL mapping regex was saved | ||
---|---|---|---|
Product: | Red Hat Directory Server | Reporter: | sgouvern |
Component: | cockpit-389-ds | Assignee: | mreynolds |
Status: | CLOSED ERRATA | QA Contact: | LDAP QA Team <idm-ds-qe-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | high | ||
Version: | 12.0 | CC: | idm-ds-dev-bugs, mreynolds, pasik, vashirov |
Target Milestone: | DS12.0 | Keywords: | Triaged |
Target Release: | dirsrv-12.2 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | redhat-ds-12-9020020221130212339.1674d57 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2023-05-30 09:40:35 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
sgouvern
2021-10-26 13:19:34 UTC
With cockpit-389-ds-2.0.14-2.module+el9dsrv+14105+a1e450bc.noarch In some cases, invalid regular expressions are now detected and a warning message is displayed : 'You must provide a valid regular expression' In such cases, cockpit will behave correctly, no more crash, and testing a test regex will result in an error message be displayed 'Invalid regular expression' But there are still cases where invalid regular expression is not detected, for example \(.*\)@\(.*\)\. In this case a Ooops! red message is displayed at the top of the page : 'Cockpit had an unexpected internal error.You can try restarting Cockpit by pressing refresh in your browser.' Even if the issue is minor, as despite this Ooops! unexpected error everything seem to be still working correctly, it may be alarming for the user. I can not reproduce the crash, and it was not clear what the exact regex was (did it have a trailing period or was that to indicate the end of the sentence?). I tried: \(.*\)@\(.*\)\ --> this is rejected by UI as an invalid regex, and it does not allow me to save it or test it. and \(.*\)@\(.*\)\. --> This is accepted by the UI, and does not cause any crashes either saving it or testing it. Sylvie, what steps am I missing? Mark, I could reproduce editing the Kerberos uid mapping, suppressing the 2 last characters of regex : \(.*\)@\(.*\)\.\(.* The invalid regex is not detected (no error message 'you must provide a valid regular expression' displayed) Then entering random characters in test regex, for example cn=fgsgf, and clicking on 'Test it' will result in a Oooops! red message displayed at the top of the window : Unexpected error. Cockpit had an unexpected internal error. You can try restarting Cockpit by pressing refresh in your browser. The javascript console contains details about this error (Ctrl-Shift-J in most browsers). (In reply to sgouvern from comment #8) > With cockpit-389-ds-2.0.14-6, the Bz is still Failed QA. > The crash can be reproduced editing the Kerberos uid mapping, suppressing > the 2 last characters of regex : > Regular Expression : \(.*\)@\(.*\)\.\(.* > Test Regex / Test it -> Ooops! ... Cockpit had an unexpected internal error > ... > > It is not able to detect that the regex is invalid in this case ^^ ('you > must provide a valid regular expression' is *not* displayed) > > BTW I understand that with this commit : > https://github.com/389ds/389-ds-base/commit/ > b5c24f5a6316d318998d62fbd5e056aa5edb36e0 the 'Test' button should be > disabled if the regex is invalid, which is not the case With the latest version of UI, and latest npm packages, this problem is no longer reproducible. Build tested: 389-ds-base-2.2.6-1.module+el9dsrv+17949+63c5b04e.x86_64 cockpit-389-ds-2.2.6-1.module+el9dsrv+17949+63c5b04e.noarch I can no longer reproduce the crash. "Test It" button also stays grayed out when the regex is incorrect. Marking as VERIFIED. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (redhat-ds:12 bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2023:3344 |