OpenConext / OpenConext-engineblock

OpenConext SAML 2.0 IdP/SP Gateway
14 stars 22 forks source link

Request access bugs #1707

Closed phavekes closed 4 days ago

phavekes commented 4 days ago

This issue is imported from pivotal - Originaly created at Jan 17, 2022 by Thijs Kinkhorst

If you fill out the RA form correctly, you get a success message but the email is not sent. I\'ve identified the following bugs in this regard:

1 (Minor) If you press an unconnected IdP the RA form is shown, but you click the greyed out IdP (which remains visible) again you get errors in the JS console 2 The POST to performRequestAccessAction returns a 200 OK but the returned HTML content contains the form again with the indication that "institution" is empty. However, this HTML is never displayed, instead the form is closed and the success message is shown, even though there was a validation error and nothing was sent. 3 The email is not sent because the "institution" field is empty in the POST (a hidden form field that the user cannot influence). I think this is because this line in RequestAccessModalHelper.js:

        let $institutionField   = this.requestAccessElement.querySelector(\'institution\');

should be:

        let $institutionField   = this.requestAccessElement.querySelector(\'input[name="institution"]\');

The serverside action validator trips over the empty institution field and does not send the email.

Total estimation: 4h

phavekes commented 4 days ago

For 2: see the screencast. Question: the error message indeed is that the institution is not set on the form (hidden form field) the error message displayed on screen is not specific in that area. I feel this is what we want. But feel free to suggest something different! (Michiel Kodde - Apr 28, 2022)